public async Task CreateShips(string coordinates) { var shipsCoordinates = _coordinatesParser.Parse(coordinates).ToList(); var battle = await _battleRepository.GetBattle(); battle.CreateShips(shipsCoordinates); await _battleRepository.UpdateBattle(battle); }
public async Task ClearBattle() { var battle = await _battleRepository.GetBattle(); battle.Clear(); await _battleRepository.UpdateBattle(battle); }
public async Task <BattleStatistics> GetStatistics() { var battle = await _battleRepository.GetBattle(); return(battle.GetStatistics()); }