ctf.environment
Class AgentGrid
java.lang.Object
|
+--ctf.environment.Grid
|
+--ctf.environment.AgentGrid
- class AgentGrid
- extends Grid
Grid of agent locations for a particular team
Note that this class only has package access enabled.
- Author:
- Jason Rohrer
Constructor Summary |
(package private) |
AgentGrid(int inBoardSize,
Agent inAgent)
Constructs an AgentGrid . |
Method Summary |
protected void |
drawObject(Graphics inGraphics,
int inStartX,
int inStartY,
int inWide,
int inHigh)
Draws a graphical representation of an object in a specific location
in a graphics context. |
Methods inherited from class ctf.environment.Grid |
add,
add,
clear,
draw,
exists,
exists,
getDrawDimension,
remove,
remove,
setFillColor,
setLineColor |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
AgentGrid
AgentGrid(int inBoardSize,
Agent inAgent)
- Constructs an
AgentGrid
.
- Parameters:
inBoardSize
- the board width and height, in number of grid spaces.inAgentImage
- image to represent agents on grid when grid is drawn.
drawObject
protected void drawObject(Graphics inGraphics,
int inStartX,
int inStartY,
int inWide,
int inHigh)
- Description copied from class: Grid
- Draws a graphical representation of an object in a specific location
in a graphics context. To be implemented by all non-abstract subclasses
for drawing graphical representations of particular kinds of grid
objects.
- Overrides:
- drawObject in class Grid
- Tags copied from class: Grid
- Parameters:
inGraphics
- the graphics context in which to draw the object.inStartX
- the starting x coordinate in inGraphics
for the object.inStartY
- the starting y coordinate in inGraphics
for the object.inWide
- the width of the object image.inHigh
- the height of the object image.