|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The NodeModel is used by the AlphaBeta.
| Field Summary | |
static long |
serialVersionUID
|
| Method Summary | |
boolean |
gameOver()
Checks whether the game is over or not |
java.util.Vector |
getAllMoves(int player)
Will return all possible moves for the player |
int[][] |
getBoard()
Will return the board |
int[][] |
move(int row,
int col)
Makes a valid move in the board and returns the new board. |
void |
retractState(int[][] board,
int player)
Retracts a move for the board. |
int |
value(int player,
int depth)
Will return the calculated value for a certain state |
| Field Detail |
public static final long serialVersionUID
| Method Detail |
public int[][] getBoard()
intpublic java.util.Vector getAllMoves(int player)
player - Viewpoint from player int
public int value(int player,
int depth)
player - The player is represented as an intdepth - The depth is represented as an int
public int[][] move(int row,
int col)
Makes a valid move in the board and returns the new board.
move - The move represented as a Stringint Returns the new representation of the board
public void retractState(int[][] board,
int player)
Retracts a move for the board.
board - The board is represented as a matrix of intplayer - The player is represented as an intpublic boolean gameOver()
true if it is GAME OVER,
otherwise false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||