|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ou.mancala.board.GameBoard
public final class GameBoard
Class used to handle the operations of the mancala game board.
Field Summary | |
---|---|
static boolean |
PLAYER_ONE
|
static boolean |
PLAYER_TWO
|
Constructor Summary | |
---|---|
GameBoard(boolean hasView)
|
Method Summary | |
---|---|
int[] |
boardContents()
Return the contents of the current board in a non modifiable way. |
boolean |
canMove(boolean player,
int boardIndex)
Return whether the specified player can make the move wanted. |
void |
checkGameOver()
Check the state to see if game over has been accomplished. |
void |
cleanupGame()
Remove resources from the game. |
MancalaPlayer[] |
getPlayers()
Get the players involved in this game. |
boolean |
isRunning()
|
void |
move(int boardIndex)
Method to perform a movement for the board. |
boolean |
player()
|
void |
runGame()
|
void |
setupGame()
Setup the board to be played. |
void |
step()
Perform the movement operations for the board. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean PLAYER_ONE
public static final boolean PLAYER_TWO
Constructor Detail |
---|
public GameBoard(boolean hasView)
Method Detail |
---|
public MancalaPlayer[] getPlayers()
public int[] boardContents()
public void checkGameOver()
public boolean canMove(boolean player, int boardIndex)
player
- - The player to make the move forboardIndex
- - The move to make
public void move(int boardIndex)
boardIndex
- - The slot to move from.public boolean player()
public boolean isRunning()
public void setupGame()
public void cleanupGame()
public void step()
public void runGame()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |