Esempio n. 1
0
        public void Start()
        {
            while (_fireShotWorkflow.PlayAgain == "Y")
            {
                ConsoleOutput.SplashScreen();

                _input.SetPlayerNames();


                //process player1 turn
                _output.PrintBoard(Player1Board);

                PlaceShipWorkflow placeShip = new PlaceShipWorkflow();
                placeShip.Execute(Player1Board);


                Console.Write($"Press any key to setup {Player2Name}'s board...");
                Console.ReadKey();

                //process player2 turn
                Console.Clear();

                Console.WriteLine($"{Player2Name}'s Board Setup\n\n");

                _output.PrintBoard(Player2Board);

                placeShip.Execute(Player2Board);

                Console.WriteLine();
                Console.Write("Press any key to begin the battle!");
                Console.ReadKey();

                Console.Clear();
                playerTurn = ConsoleOutput.WhoGoesFirst();

                _fireShotWorkflow.Execute();
            }
        }