|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--GameMap
The map of the game field, here we do a little tradeoff time-memory in favor of time
| Field Summary | |
private int |
height
height |
static char |
HOME_BASE
Home base tile |
private char[][] |
map
the map |
static char |
PLAIN
Plain tile |
static char |
WALL
Wall tile |
static char |
WATER
Water tile |
private int |
width
width |
| Constructor Summary | |
GameMap(int w,
int h,
char[][] field)
Constructs a new game map |
|
| Method Summary | |
char |
getAt(int x,
int y)
get whats inside the (x, y) position |
int |
height()
get height |
int |
width()
get width |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final char PLAIN
public static final char WATER
public static final char WALL
public static final char HOME_BASE
private char[][] map
private int width
private int height
| Constructor Detail |
public GameMap(int w,
int h,
char[][] field)
w - width of the maph - height of the mapfield - the drawing of the map| Method Detail |
public char getAt(int x,
int y)
public int width()
public int height()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||