public class BitFieldClumsy extends AbstractField
height, turnCounter, width| Constructor and Description |
|---|
BitFieldClumsy(int w,
int h) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkDraw()
Returns true if the board is full (and nobody won)
|
boolean |
checkWin(int player)
Check if player (0 or 1) has won
|
double |
evaluate(int player) |
double |
evaluatePlayerZero()
Heuristic to evaluate the quality of the position for player 0
|
int |
getField(int x,
int y)
What is on field x,y?
|
int |
getPlayer()
Returns the player who plays next
|
boolean |
isOpen(int column)
Checks if there can a coin be dropped into
|
void |
makeMove(int column)
Drop a coin in column
|
void |
undoMove()
Undo last move
|
getTurnCounter, toStringpublic void makeMove(int column)
AbstractFieldmakeMove in class AbstractFieldpublic void undoMove()
AbstractFieldundoMove in class AbstractFieldpublic boolean checkWin(int player)
AbstractFieldcheckWin in class AbstractFieldpublic double evaluatePlayerZero()
AbstractFieldevaluatePlayerZero in class AbstractFieldpublic double evaluate(int player)
public int getField(int x,
int y)
AbstractFieldgetField in class AbstractFieldpublic boolean isOpen(int column)
AbstractFieldisOpen in class AbstractFieldpublic int getPlayer()
AbstractFieldgetPlayer in class AbstractFieldpublic boolean checkDraw()
AbstractFieldcheckDraw in class AbstractField