|
||||||||||
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()
int
public 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 int
depth
- 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 String
int
Returns the new representation of the boardpublic void retractState(int[][] board, int player)
Retracts a move for the board.
board
- The board is represented as a matrix of int
player
- The player is represented as an int
public 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 |