File | Line |
---|
cz\cuni\amis\pogamut\defcon\utils\quadtree\BuildingPlacementQuadTreeLabellingMethod.java | 19 |
cz\cuni\amis\pogamut\defcon\utils\quadtree\UnitPlacementQuadTreeLabellingMethod.java | 19 |
public UnitPlacementQuadTreeLabellingMethod(DefConWorldView worldview,
Logger log) {
this.worldview = worldview;
this.log = log;
}
@Override
public boolean label(QuadTreeNode node) {
if (node.isLabeled()) {
if (node.getNodes() != null &&
(node.getFirst().isLabeled() ||
node.getSecond().isLabeled() ||
node.getThird().isLabeled() ||
node.getFourth().isLabeled())) {
return true;
}
node.setLabel(false);
return false;
}
boolean b = node.getNodes() == null && worldview.getGameInfo()
.isValidShipPlacementLocation( |
File | Line |
---|
cz\cuni\amis\pogamut\defcon\communication\worldview\modules\grid\basic\SymmetricGridCell.java | 69 |
cz\cuni\amis\pogamut\defcon\communication\worldview\NativeMapSource.java | 180 |
if (x < -X_SPAN || x > X_SPAN || y < -Y_SPAN || y > Y_SPAN)
return false;
switch (flag) {
case SEA:
return gameInfo.isValidTerritory(-1, x, y, true);
case LAND:
return gameInfo.isValidTerritory(-1, x, y, false);
case OWN_TERRITORY: {
int id = gameInfo.getOwnTeamId();
return gameInfo.isValidTerritory(id, x, y, false)
|| gameInfo.isValidTerritory(id, x, y, true);
}
case ENEMY_TERRITORY: {
Boolean ok = false;
for (int id : gameInfo.getEnemyTeamIds()) {
if (ok = hasEnemyTerritoryFlagWorker(x, y, id)) |