|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface TronStateInterface
This is the interface that your TronState class must implement. April 2010
| Method Summary | |
|---|---|
int[][] |
getBoard()
Returns a copy of the array representing the board of the game. |
Cell |
getHead(int playerNum)
Returns the head of the specified player. |
java.util.ArrayList<TronObstacle> |
getObstacles()
Returns the list of obstacles on the board. |
void |
setCell(int row,
int col,
int value)
Sets the specified cell of the board to the specified value. |
void |
setHead(int playerNum,
Cell head)
Sets the head position for the specified player. |
| Method Detail |
|---|
int[][] getBoard()
void setCell(int row,
int col,
int value)
row - is row of the cell to setcol - is column of the cell to setvalue - is new value of the celljava.util.ArrayList<TronObstacle> getObstacles()
TronObstacleCell getHead(int playerNum)
playerNum - the player number to get the head row of (always 0 or 1)
void setHead(int playerNum,
Cell head)
playerNum - the player number to get the head column of (always 0 or 1)head - the position of the head
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||