|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmixmeta4.Board
public class Board
Field Summary | |
---|---|
Game |
game
|
BoardGUI |
gui
|
Move |
lastMove
|
int |
numColumns
Deprecated, use getNumColumns(). |
int |
numRows
Deprecated, use getNumRows(). |
boolean |
redToMove
Deprecated, use getter redToMove(). |
Move |
secondLastMove
|
Square[][] |
squares
|
boolean |
tty
|
boolean |
visible
|
Constructor Summary | |
---|---|
Board()
Constructor used by clone(). |
|
Board(Game game,
java.lang.String setup,
boolean visible)
|
Method Summary | |
---|---|
boolean |
blackFinished()
Assume black's pieces started in the first n rows. |
boolean |
blackKingTaken()
Determine whether black king has been taken. |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
|
void |
execute(Move move)
|
boolean |
exists(java.awt.Point location)
|
Actions |
getActions()
Get the legal Moves for the current board configuration. |
Actions |
getActions(Piece piece)
Get the Moves for a piece. |
PieceSet |
getBlackPieces()
|
Game |
getGame()
|
int |
getMovesSinceCapture()
Get the number of moves (ply) since a piece was captured. |
Moves |
getMovesSoFar()
|
int |
getNumColumns()
get the number of columns in the board |
int |
getNumRows()
get the number of rows in the board |
Percept |
getPercept()
|
PieceSet |
getRedPieces()
|
Square |
getSquare(java.awt.Point location)
|
int |
hashCode()
|
boolean |
redFinished()
Assume red's pieces started in the first n rows. |
boolean |
redKingTaken()
Determine whether red king has been taken. |
boolean |
redToMove()
Find out who's turn it is to move. |
java.lang.String |
toString()
|
void |
update(Action action)
Updates the board by executing the move and toggling whose turn it is to move. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public BoardGUI gui
public Game game
public boolean redToMove
public boolean visible
public boolean tty
public Square[][] squares
public int numRows
public int numColumns
public Move lastMove
public Move secondLastMove
Constructor Detail |
---|
public Board(Game game, java.lang.String setup, boolean visible)
public Board()
Method Detail |
---|
public java.lang.Object clone()
clone
in interface Environment
clone
in interface State
clone
in class java.lang.Object
public Percept getPercept()
getPercept
in interface Environment
public void update(Action action) throws java.lang.RuntimeException
update
in interface Environment
update
in interface State
java.lang.RuntimeException
public void execute(Move move)
public Actions getActions()
getActions
in interface State
public Actions getActions(Piece piece)
public boolean exists(java.awt.Point location)
public Square getSquare(java.awt.Point location)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public Moves getMovesSoFar()
public boolean redFinished()
public boolean blackFinished()
public boolean redKingTaken()
public boolean blackKingTaken()
public Game getGame()
public PieceSet getRedPieces()
public PieceSet getBlackPieces()
public int getNumRows()
public int getNumColumns()
public boolean redToMove()
public int getMovesSinceCapture()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |