ctf.environment
Class SingletonGrid
java.lang.Object
|
+--ctf.environment.Grid
|
+--ctf.environment.SingletonGrid
- Direct Known Subclasses:
- BaseGrid, FlagGrid
- abstract class SingletonGrid
- extends Grid
Grid that supports exactly one existing object.
Note that this class only has package access enabled.
- Author:
- Jason Rohrer
Constructor Summary |
protected |
SingletonGrid(int inBoardSize,
Color inLineColor,
Color inFillColor)
Constructs a SingletonGrid . |
Methods inherited from class ctf.environment.Grid |
add,
add,
clear,
draw,
drawObject,
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 |
SingletonGrid
protected SingletonGrid(int inBoardSize,
Color inLineColor,
Color inFillColor)
- Constructs a
SingletonGrid
.
- Parameters:
inBoardSize
- dimension of grid.inLineColor
- line color for drawing objects in this grid.inFillColor
- fill color for drawing objects in this grid.
setLocation
void setLocation(int inX,
int inY)
- Set object location.
- Parameters:
inX
- x coordinate of object location.inY
- y coordinate of object location.
setLocation
void setLocation(EnvironmentLocation inLocation)
- Set object location.
- Parameters:
inLocation
- new location of object.
getLocation
EnvironmentLocation getLocation()
- Get object location.
- Returns:
- location of base in grid.