コード例 #1
0
ファイル: Game.cs プロジェクト: Ajurgs/Battleship
 private void Shoot(int x, int y)
 {
     if (board.CheckHit(x, y) == 0)
     {
         board.Miss(x, y);
         board.Display(hacks);
         Console.WriteLine("That's a miss Capitan!");
     }
     else if (board.CheckHit(x, y) == 1)
     {
         HitShip(x, y);
         board.Display(hacks);
     }
     else if (board.CheckHit(x, y) == 2)
     {
         // hit previous target
         board.Display(hacks);
         Console.WriteLine("You have already hit that spot Capitan!\nThings don't move in this game");
     }
 }