public void Fill_Negative(int gridSize, int shipSize, int shipCount) { var ships = PrepareShips(new Dictionary <int, int>() { { shipSize, shipCount } }); var filler = new ShipsVerticalFiller(ships); var squares = new SquareStates[gridSize, gridSize]; filler.Fill(ref squares, gridSize); }
public void Fill_Positive(int gridSize, int shipSize, int shipCount) { var ships = PrepareShips(new Dictionary <int, int>() { { shipSize, shipCount } }); var filler = new ShipsVerticalFiller(ships); var squares = new SquareStates[gridSize, gridSize]; var shipsOnGrid = filler.Fill(ref squares, gridSize); Assert.AreEqual(shipCount, shipsOnGrid.Count, $"There should be {shipCount} ships placed on grid ({gridSize})."); }