java.io.Serializablepublic class GridData
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field | Description |
|---|---|---|
static byte |
GRID_CELL_BORDER_BOTTOM |
|
static byte |
GRID_CELL_BORDER_LEFT |
|
static byte |
GRID_CELL_BORDER_RIGHT |
|
static byte |
GRID_CELL_BORDER_TOP |
|
static byte |
GRID_CELL_FRUIT |
|
static byte |
GRID_CELL_PELLET |
|
static byte |
GRID_CELL_POWER_PILL |
| Constructor | Description |
|---|---|
GridData(int grid_width,
short[] grid_data) |
Constructor for a Grid object
|
| Modifier and Type | Method | Description |
|---|---|---|
short[][] |
get2DGridData() |
|
short[] |
getGridData() |
|
int |
getGridWidth() |
|
void |
setGridData(short[] grid_data) |
Method to set the grid's data array
|
void |
setGridWidth(int grid_width) |
A method to specify the grid's width
|
public static final byte GRID_CELL_BORDER_LEFT
public static final byte GRID_CELL_BORDER_TOP
public static final byte GRID_CELL_BORDER_RIGHT
public static final byte GRID_CELL_BORDER_BOTTOM
public static final byte GRID_CELL_PELLET
public static final byte GRID_CELL_FRUIT
public static final byte GRID_CELL_POWER_PILL
public GridData(int grid_width,
short[] grid_data)
grid_width - the horizontal size of the grid objectgrid_data - an array that holds the information about items in the levelpublic void setGridWidth(int grid_width)
grid_width - an integer that represents the desired widthpublic void setGridData(short[] grid_data)
grid_data - an array of type short that holds the desired grid datapublic short[][] get2DGridData()
public int getGridWidth()
public short[] getGridData()