Go to the documentation of this file.
45 Map *worldMap = mp->GetMap();
53 for (
int x1 = x-rad; x1 <= x+rad; x1++)
57 for (
int y1 = y-rad; y1 <= y+rad; y1++)
99 aMap->RepairAbstraction();
105 glColor3f(.25, .25, .25);
107 GLdouble coverage = 0.9;
112 GLdouble a, b, c, radius;
116 glVertex3f(a+coverage*radius, b+coverage*radius, c-4*radius);
117 glVertex3f(a+coverage*radius, b-coverage*radius, c-4*radius);
118 glVertex3f(a-coverage*radius, b-coverage*radius, c-4*radius);
119 glVertex3f(a-coverage*radius, b+coverage*radius, c-4*radius);
180 node *
loc =
aMap->GetAbstractGraph(0)->GetNode(_node);
virtual Map * GetMap() const
virtual Map * GetMap() const =0
int GetNodeNum(int x, int y, tCorner c=kNone)
Gets the abstract Graph node number for this tile.
edge * FindEdge(unsigned int from, unsigned int to)
Finds an edge between nodes with ids from and to, no matter which direction.
virtual void UpdateLocation(environment *, state &, bool success, SimulationInfo< state, action, environment > *)=0
virtual MapAbstraction * GetMapAbstraction()
void UpdateLocation(Unit< xyLoc, tDirection, AbsMapEnvironment > *u, AbsMapEnvironment *, xyLoc &loc, bool success, AbsMapSimulationInfo *)
reset the location of a given unit
bool AdjacentCorners(long x, long y, tCorner corner) const
void SetVisibilityRadius(int _visibility)
void SumStat(const char *category, const char *owner, double value)
Given stats for the category and owner, find an existing stat (chronologically backwards search) with...
void Set(uint64_t index, bool value)
virtual void GetLocation(state &)=0
virtual const char * GetName()
long GetMapWidth() const
return the width of the map
void StartNewTrial(StatCollection *stats)
Lets the unit group do what it needs to reset a trial.
long GetTerrainType(long x, long y, tSplitSide split=kWholeTile) const
Get the terrain type of the (split) tile at x, y.
A map abstraction based on the reduction of cliques.
virtual void OpenGLDraw(const AbsMapEnvironment *, const AbsMapSimulationInfo *) const
int GetVisibilityRadius()
The StatCollection class is for collecting stats across different parts of the simulation.
bool Explored(int x, int y)
SharedAMapGroup(MapProvider *)
virtual bool Done()
Is the group done with their exploration?
void LogStats(StatCollection *stats)
long GetMapHeight() const
return the height of the map
void AddStat(const char *category, const char *owner, double value)
Add a new stat entry for the given category, owner and value.
bool AdjacentEdges(long x, long y, tEdge edge) const
Is the tile at x, y adjacent across the edge?
bool GetOpenGLCoord(int _x, int _y, GLdouble &x, GLdouble &y, GLdouble &z, GLdouble &radius) const
Get the openGL coordinates of a given tile.
void SetTerrainType(int32_t x1, int32_t y1, int32_t x2, int32_t y2, tTerrain t)
Map::SetTerrainType()
bool Get(uint64_t index) const
Nodes to be stored within a Graph.
A tile-based representation of the world.
Edge class for connections between node in a Graph.