コード例 #1
0
ファイル: UI.cs プロジェクト: FilipeToulson/Battle-Ship
        public static void DisplayPlayScreen(List <Ship> ships, List <Shot> shotsTaken, Shot opponentShot)
        {
            Console.WriteLine("-----------------------------------------------------------------------");
            Console.WriteLine("Your shots (M: shot missed enemy ship, H: shot hit enemy ship):");

            DisplayShotsBoard(shotsTaken);

            //Only display oppoinent shot info if the opponent has taken a shot
            if (opponentShot != null)
            {
                DisplayOpponenetShotInfo(opponentShot);
            }

            Console.WriteLine("Your ships (an X shows where you've been hit):");

            DisplayShipsBoard(ships);

            Console.WriteLine("Input coordinates to take a shot:");
        }