public bool AllShippsPlaced() { return(Ships.All(ship => ship.Placed)); }
public bool IsOver() { return(Ships.All(s => s.IsSunk())); }
public bool IsGameOver() => Ships.All(s => s.IsSunk());
/// <summary> /// Returns a value indicating whether all ships on this board have been sunk. /// </summary> public bool GetAllShipsSunk() { return(Ships.All(pair => pair.Value.IsSunk())); }
public bool AreAllShipsSunk() { // If any ship is not sunk, the game has not ended. return(Ships.All(IsShipSunk)); }
private bool IsGameOver() { return(Ships.All(s => s.IsSunk)); }