public function calculate($elo0, $elo1, $win, $reliability0 = 1.0, $reliability1 = 1.0, $kFactor0 = null, $kFactor1 = null)
    {
        self::checkCoef($reliability0, 'reliability0');
        self::checkCoef($reliability1, 'reliability1');
        self::checkCoef($win, 'win');
        
        $kFactor0 = (null === $kFactor0) ? $this->kFactor : $kFactor0;
        $kFactor1 = (null === $kFactor1) ? $this->kFactor : $kFactor1;
        
        /**
         * Calculate probability 0 have to beat 1
         */
        $proba = $this->proba($elo0, $elo1);
        
        /**
         * Calculate elo changement
         */
        $eloUpdate0 = $win - $proba;
        $eloUpdate1 = -$eloUpdate0;
        
        /**
         * Calculate local reliability to avoid 0 and 0 reliability for new players
         * (if two new players have 0 and 0.1 reliability, they are rectified to 0.9 and 1)
         */
        self::rectifyReliabilityCoefs($reliability0, $reliability1);
        
        /**
         * Apply coefs K-factor and reliability of each other
         */
        $eloUpdate0 *= $kFactor0 * $reliability1 ;
        $eloUpdate1 *= $kFactor1 * $reliability0 ;
        
        return array($elo0 + $eloUpdate0, $elo1 + $eloUpdate1);
    }