public override List <S_Tile> GetValidTiles(S_Tile origin) { List <S_Tile> result = new List <S_Tile>(); for (int dx = -1; dx <= 1; dx++) { for (int dy = -1; dy <= 1; dy++) { if ((dx == 0) == (dy == 0)) { continue; } List <S_Tile> possibles = origin.GetTilesInLine(dx, dy); foreach (S_Tile poss in possibles) { if (poss.occupier != null) { result.Add(poss); break; } } } } return(result); }
public override List <S_Tile> GetValidTiles(S_Tile origin) { List <S_Tile> result = new List <S_Tile>(); for (int dx = -1; dx <= 1; dx++) { for (int dy = -1; dy <= 1; dy++) { if (dx != 0 && dy != 0) { continue; } if (dx == 0 && dy == 0) { continue; } List <S_Tile> line = origin.GetTilesInLine(dx, dy); if (line.Count > 0) { result.Add(line[line.Count - 1]); } } } return(result); }
public override List<S_Tile> GetValidTiles(S_Tile origin) { List<S_Tile> result = new List<S_Tile>(); for (int dx = -1; dx <= 1; dx++) { for (int dy = -1; dy <= 1; dy++) { if (dx != 0 && dy != 0) continue; if (dx == 0 && dy == 0) continue; List<S_Tile> line = origin.GetTilesInLine(dx, dy); if(line.Count>0){ result.Add(line[line.Count-1]); } } } return result; }