private IEnumerable <ICoordinate> GetAllShipCoordinates() { var allOccupiedCoordinates = TheSea.GetAllSurvivingShips() .Select(x => x.GetLocation()) .SelectMany(x => x.GetCoordinates()); return(allOccupiedCoordinates); }
private void StartGameLoop() { while (true) { CurrentTurn = new Turn(TheSea.GetAllSurvivingShips(), TheSea, ViewModel); CurrentTurn.Start(); UpdateUI(); if (HasWinner()) { return; } Turns.Add(CurrentTurn); Delay(); } }