public void MakeWholeMapWater() { Game game = new Game(); game.FillNewMap(); bool isAllWater = true; foreach (var coordinate in game.map) { if (coordinate != State.Water) { isAllWater = false; } } Assert.True(isAllWater); }
static void Main(string[] args) { Game game = new Game(); game.FillNewMap(); Ship battleship = new Ship(5); Ship destroyerA = new Ship(4); Ship destroyerB = new Ship(4); battleship.Spawn(game.map); destroyerA.Spawn(game.map); destroyerB.Spawn(game.map); while (!game.GameWon()) { game.DrawMap(); game.ShootTarget(game.GetTarget(Console.ReadLine())); } Console.WriteLine("Congrats!"); }