public class GameMapInfoPolygons extends cz.cuni.amis.pogamut.base.agent.module.SensorModule<DefConAgent>
Modifier and Type | Field and Description |
---|---|
protected int |
currentEnemyId
Current enemy id in case based on territory.
|
protected BasicFlag |
currentFlag
Currently processed flag
|
protected int |
currentTerritoryId
Current territory id in case of TERRITORY flags
|
protected TreeMap<Integer,SortedMap<Integer,Pair<List<List<DefConLocation>>,List<List<DefConLocation>>>>> |
enemyTerritories
List of enemy territories.
|
protected IFlagChecker |
flagChecker
Flag checker for queries to map features
|
protected List<List<DefConLocation>> |
land
Land.
|
protected int |
lastAssignedTerritory |
protected double |
minX |
protected double |
minY |
protected TreeMap<Integer,Pair<List<List<DefConLocation>>,List<List<DefConLocation>>>> |
ownTerritories
List of own territories.
|
protected List<List<DefConLocation>> |
sea
Sea.
|
protected float |
SIMPLIFICATION_FACTOR
Factor of polygon's area to vertices count.
|
protected float |
STEP_SIZE
Size of a sampling step.
|
protected ArrayList<Pair<List<List<DefConLocation>>,List<List<DefConLocation>>>> |
territories
Territories.
|
Constructor and Description |
---|
GameMapInfoPolygons(DefConAgent<?> agent,
IFlagChecker flagChecker) |
GameMapInfoPolygons(DefConAgent<?> agent,
IFlagChecker flagChecker,
String preprocessedPath) |
GameMapInfoPolygons(DefConAgent<?> agent,
IFlagChecker flagChecker,
String preprocessedPath,
Logger log) |
GameMapInfoPolygons(DefConAgent<?> agent,
IFlagChecker flagChecker,
String preprocessedPath,
Logger log,
cz.cuni.amis.pogamut.base.component.controller.ComponentDependencies dependencies) |
Modifier and Type | Method and Description |
---|---|
SortedMap<Integer,SortedMap<Integer,Pair<List<List<DefConLocation>>,List<List<DefConLocation>>>>> |
getEnemiesTerritories() |
SortedMap<Integer,Pair<List<List<DefConLocation>>,List<List<DefConLocation>>>> |
getEnemyTerritories(int enemyId)
Returns a list of territories the enemy has.
|
List<List<DefConLocation>> |
getLand()
Returns contours of negation of sea.
|
SortedMap<Integer,Pair<List<List<DefConLocation>>,List<List<DefConLocation>>>> |
getOwnTerritories() |
List<List<DefConLocation>> |
getSea()
Returns contours of sea.
|
Pair<List<List<DefConLocation>>,List<List<DefConLocation>>> |
getTerritory(int territoryId)
Returns a single territory.
|
DefConWorldView |
getWorldView() |
protected void |
processMap()
Processes the map from scratch.
|
void |
saveBorders(IPrecomputedBordersSaver saver) |
protected final float STEP_SIZE
protected final float SIMPLIFICATION_FACTOR
protected ArrayList<Pair<List<List<DefConLocation>>,List<List<DefConLocation>>>> territories
protected TreeMap<Integer,Pair<List<List<DefConLocation>>,List<List<DefConLocation>>>> ownTerritories
protected TreeMap<Integer,SortedMap<Integer,Pair<List<List<DefConLocation>>,List<List<DefConLocation>>>>> enemyTerritories
protected List<List<DefConLocation>> land
protected List<List<DefConLocation>> sea
protected IFlagChecker flagChecker
protected BasicFlag currentFlag
protected int currentTerritoryId
protected int currentEnemyId
protected int lastAssignedTerritory
protected double minX
protected double minY
public GameMapInfoPolygons(DefConAgent<?> agent, IFlagChecker flagChecker)
public GameMapInfoPolygons(DefConAgent<?> agent, IFlagChecker flagChecker, String preprocessedPath)
public GameMapInfoPolygons(DefConAgent<?> agent, IFlagChecker flagChecker, String preprocessedPath, Logger log)
public GameMapInfoPolygons(DefConAgent<?> agent, IFlagChecker flagChecker, String preprocessedPath, Logger log, cz.cuni.amis.pogamut.base.component.controller.ComponentDependencies dependencies)
public void saveBorders(IPrecomputedBordersSaver saver)
public DefConWorldView getWorldView()
protected void processMap()
public SortedMap<Integer,Pair<List<List<DefConLocation>>,List<List<DefConLocation>>>> getOwnTerritories()
public SortedMap<Integer,SortedMap<Integer,Pair<List<List<DefConLocation>>,List<List<DefConLocation>>>>> getEnemiesTerritories()
public Pair<List<List<DefConLocation>>,List<List<DefConLocation>>> getTerritory(int territoryId)
territoryId
- public SortedMap<Integer,Pair<List<List<DefConLocation>>,List<List<DefConLocation>>>> getEnemyTerritories(int enemyId)
enemyId
- public List<List<DefConLocation>> getLand()
public List<List<DefConLocation>> getSea()
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.