示例#1
0
        public void MainGame()
        {
            NewGame();

            do
            {
                var missile = Player1.TakeTurn(Player2.FleetBoard);

                if (Player2.FleetDestroyed)
                {
                    Console.WriteLine($"Player 1 wins");
                    break;
                }

                Player2.TakeTurn(Player1.FleetBoard);
                if (Player1.FleetDestroyed)
                {
                    Console.WriteLine($"Player 2 wins");
                    break;
                }
            } while(!IsGameOver());
        }