public function getWinner()
    {
        if (!$this->isGameOver()) {
            return null;
        }

        if ($this->getScore(self::PLAYER_0) === $this->getScore(self::PLAYER_1)) {
            return self::DRAW;
        } elseif ($this->getScore(self::PLAYER_0) > $this->getScore(self::PLAYER_1)) {
            return self::PLAYER_0;
        } else {
            return self::PLAYER_1;
        }
    }
public function getWinner()
    {
        if (!$this->isGameOver()) {
            return null;
        }

        if ($this->getScore(self::PLAYER_0) === $this->getScore(self::PLAYER_1)) {
            return self::DRAW;
        } elseif ($this->getScore(self::PLAYER_0) > $this->getScore(self::PLAYER_1)) {
            return self::PLAYER_0;
        } else {
            return self::PLAYER_1;
        }
    }
public function getWinner ( ) { if ( ! $ this -> isGameOver ( ) ) { return null ; } if ( $ this -> getScore ( self :: PLAYER_0 ) === $ this -> getScore ( self :: PLAYER_1 ) ) { return self :: DRAW ; } elseif ( $ this -> getScore ( self :: PLAYER_0 ) > $ this -> getScore ( self :: PLAYER_1 ) ) { return self :: PLAYER_0 ; } else { return self :: PLAYER_1 ; } }
Returns the winner, or null if game not over.

@return int|null null for party not ended, or one of them: self::PLAYER_0, self::PLAYER_1, self::DRAW.
Returns the winner or null if game not over .