|
GeneThello Home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IBoard
Board interface shared by several modules.
| Method Summary | |
|---|---|
void |
addMovesUndoDepth(int i)
Increments depth of undo of valid moves. |
void |
addSquaresUndoDepth(int i)
Increments depth of undo of board simulation. |
int |
calcPatternValue(int turn)
Calculates sum of all pattern values for certain color of disc. |
int |
countCorners(int turn)
Calculates number of discs in corners for certain color. |
int |
countMobility(int turn)
Counts mobility for current player. |
int |
countXsquares(int turn)
Calculates number of discs in x-squares for certain color. |
int |
doPut(int idx,
int turn)
Puts new disc and flip opponent's discs if possible. |
void |
generate(int turn)
Generates valid moves for current player. |
int[] |
getDiscs()
Gets number of discs of both colors. |
int |
getDiscs(int turn)
Gets number of discs. |
int |
getFlips()
Gets the last number of flipped discs. |
int |
getMoves(int i)
Gets index'th move from array of valid moves. |
int |
getSquares(int index)
Gets value of a square in board. |
int |
getTotalDiscs()
Gets total number of discs. |
void |
insertOrUpdatePatterns(int val)
Insert or update patterns to database. |
void |
takePatterns()
Stores all patterns in current board into several sets of pattern. |
int[] |
toIntArray()
Integer array representation of board. |
void |
undoGenerate()
Undoes the last Generate(). |
void |
undoPut()
Undoes the last doPut(). |
| Method Detail |
|---|
int getDiscs(int turn)
turn - color of disc: Game.BLACK, Game.WHITE
int getTotalDiscs()
int[] getDiscs()
int getFlips()
int countMobility(int turn)
turn - Current player to count.int countCorners(int turn)
turn - color of disc: Game.BLACK, Game.WHITE
int countXsquares(int turn)
turn - color of disc: Game.BLACK, Game.WHITE
int calcPatternValue(int turn)
turn - color of disc: Game.BLACK, Game.WHITE
void generate(int turn)
turn - Current player to generate moves.int getMoves(int i)
i - index of move
void addMovesUndoDepth(int i)
i - undo depth to incrementvoid undoGenerate()
int doPut(int idx,
int turn)
idx - New disc's index (0- 63).turn - New disc's turn (BLACK or WHITE).
void addSquaresUndoDepth(int i)
i - undo depth to incrementvoid undoPut()
int[] toIntArray()
void takePatterns()
void insertOrUpdatePatterns(int val)
val - value to increment the patternint getSquares(int index)
index - board index
|
GeneThello Home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||