public void AntHill(int row, int col, int team) { AntHill hill = new AntHill(row, col, team); if (team == 0) { if (Map[row, col] == Tile.Land) { Map[row, col] = Tile.HillMine; } MyHills.Add(hill); } else { if (Map[row, col] == Tile.Land) { Map[row, col] = Tile.HillEnemy; } // exists? if (EnemyHills.FirstOrDefault(x => x.EqualTo(hill)) == null) { EnemyHills.Add(hill); } } }
public void AntHill(int row, int col, int team) { AntHill hill = new AntHill(row, col, team); map[col, row].isActiveHill = true; if (team == 0) { MyHills.Add(hill); map[col, row].isMyHill = true; } else { EnemyHills.Add(hill); map[col, row].isEnemyHill = true; } }
public void AntHill(int row, int col, int team) { if (map[row, col] == Tile.Land) { map[row, col] = Tile.Hill; } AntHill hill = new AntHill(row, col, team); if (team == 0) { MyHills.Add(hill); } else { EnemyHills.Add(hill); } }