/// <summary> /// Check Board capacity of ships /// </summary> private bool InvalidCapacity(Ship ship) { if (Ships.Count == ShipCapacity) { Log.Write($"You have the maximum number of ships:({ShipCapacity})!"); return(true); } if (ship.Type == ShipType.Battleship) { if (Ships.Count(s => s.Type == ShipType.Battleship) == 1) { return(true); } } else { if (Ships.Count(s => s.Type == ShipType.Destroyer) == 2) { return(false); } } return(false); }
public bool IsDatabaseEmpty() { return (SalesUnits.Count() == 0 && Ships.Count() == 0 && Bookings.Count() == 0 ); }