public ITile GetTile(Coordinate coordinate, OwnerTypeEnum ownerType) { switch (ownerType) { case OwnerTypeEnum.Player: return(PlayerTileMatrix.GetTile(coordinate)); case OwnerTypeEnum.Enemy: return(EnemyTileMatrix.GetTile(coordinate)); default: throw new ArgumentOutOfRangeException(nameof(ownerType), ownerType, null); } }
public void TileClicked(Coordinate coordinate, OwnerTypeEnum ownerType) { ITile tile = null; switch (ownerType) { case OwnerTypeEnum.Player: tile = PlayerTileMatrix.GetTile(coordinate); break; case OwnerTypeEnum.Enemy: tile = EnemyTileMatrix.GetTile(coordinate); break; default: throw new ArgumentOutOfRangeException(nameof(ownerType), ownerType, null); } tile.Click(); }
public void Clear() { PlayerTileMatrix.Clear(); EnemyTileMatrix.Clear(); _playerShips.Clear(); }