public Player GetWinner()
        {
            if (_player1 is null & _gamePlay1 != null)
            {
                _player1 = _gamePlay1.GetWinner();
            }
            if (_player2 is null & _gamePlay2 != null)
            {
                _player2 = _gamePlay2.GetWinner();
            }

            Console.WriteLine(_player1.GetMove());
            Console.WriteLine(_player2.GetMove());

            var winner = _player1.IsTieWith(_player2) | _player1.IsWinnerFrom(_player2)
                ? _player1 : _player2;

            Console.WriteLine(winner.GetMoveWinner());
            Console.WriteLine("");

            return(winner);
        }
Exemple #2
0
 public Player GetWinner()
 {
     return(_gamePlay.GetWinner());
 }