ctf.environment
Class ObstacleGrid
java.lang.Object
|
+--ctf.environment.Grid
|
+--ctf.environment.ObstacleGrid
- class ObstacleGrid
- extends Grid
Obstacle grid for game of capture the flag.
Independent of agents.
Note that this class only has package access enabled.
- Author:
- Jason Rohrer
Constructor Summary |
(package private) |
ObstacleGrid(int inBoardSize,
Color inLineColor,
Color inFillColor)
Constructs an ObstacleGrid . |
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 |
ObstacleGrid
ObstacleGrid(int inBoardSize,
Color inLineColor,
Color inFillColor)
- Constructs an
ObstacleGrid
.
- Parameters:
inBoardSize
- dimension of grid.inLineColor
- line color for drawing objects in this grid.inFillColor
- fill color for drawing objects in this grid.
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.