ctf.environment
Class MineGrid
java.lang.Object
|
+--ctf.environment.Grid
|
+--ctf.environment.MineGrid
- class MineGrid
- extends Grid
Mine 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) |
MineGrid(int inBoardSize,
Color inLineColor,
Color inFillColor,
Color inMineButtonColor)
Constructs a MineGrid . |
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. |
void |
setMineButtonColor(Color inMineButtonColor)
Set fill color for drawing mine button. |
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 |
MineGrid
MineGrid(int inBoardSize,
Color inLineColor,
Color inFillColor,
Color inMineButtonColor)
- Constructs a
MineGrid
.
- Parameters:
inBoardSize
- dimension of grid.inLineColor
- line color for drawing objects in this grid.inFillColor
- fill color for drawing objects in this grid.inMineButtonColor
- fill color for the mine button.
setMineButtonColor
public void setMineButtonColor(Color inMineButtonColor)
- Set fill color for drawing mine button.
- Parameters:
inMineButtonColor
- fill color for drawing mine button.
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.