ctf.environment
Class BaseGrid
java.lang.Object
|
+--ctf.environment.Grid
|
+--ctf.environment.SingletonGrid
|
+--ctf.environment.BaseGrid
- class BaseGrid
- extends SingletonGrid
Base grid for game of capture the flag. Only one base per grid.
(A separate grid should be used for each team.)
Note that this class only has package access enabled.
- Author:
- Jason Rohrer
Constructor Summary |
(package private) |
BaseGrid(int inBoardSize,
Color inLineColor,
Color inFillColor)
Constructs a BaseGrid . |
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 |
BaseGrid
BaseGrid(int inBoardSize,
Color inLineColor,
Color inFillColor)
- Constructs a
BaseGrid
.
- 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.