|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Field Summary | |
static int |
ALL_CASTLES
|
static int |
BLACK_CASTLE
|
static int |
BLACK_LONG_CASTLE
|
static int |
BLACK_SHORT_CASTLE
|
static int |
NO_CASTLES
|
static int |
WHITE_CASTLE
|
static int |
WHITE_LONG_CASTLE
|
static int |
WHITE_SHORT_CASTLE
|
Method Summary | |
int |
getCastles()
Return the still allowed castles as mask. |
java.lang.String |
getFEN()
Return the FEN representation of the current position FEN |
int |
getHalfMoveClock()
Return the number of moves since the last capture and the last pawn move. |
long |
getHashCode()
Returns a 64bit hash code of the current position. 64bit should be enough to disnstinguish positions with almost no collisions. |
int |
getPlyNumber()
Return the current ply number. |
int |
getSqiEP()
Return the current en passant square. |
int |
getStone(int sqi)
Return the stone currently on the given square. |
int |
getToPlay()
Return the player whose turn it is. |
int |
hashCode()
Returns a 32bit hash code of the current position. 32 bit is not enough to distinguish positions reliably, use only if collisions are handled. |
boolean |
isLegal()
Return whether the current position is legal. |
boolean |
isStartPosition()
Returns whether the represented position is the startposition |
void |
validate()
Validates the internal state. |
Field Detail |
public static final int NO_CASTLES
public static final int WHITE_LONG_CASTLE
public static final int WHITE_SHORT_CASTLE
public static final int BLACK_LONG_CASTLE
public static final int BLACK_SHORT_CASTLE
public static final int WHITE_CASTLE
public static final int BLACK_CASTLE
public static final int ALL_CASTLES
Method Detail |
public int getStone(int sqi)
sqi
- the square
public int getSqiEP()
public int getCastles()
public int getToPlay()
public int getPlyNumber()
public int getHalfMoveClock()
public boolean isLegal()
public java.lang.String getFEN()
FEN
public boolean isStartPosition()
public long getHashCode()
public int hashCode()
hashCode
in class java.lang.Object
public void validate() throws IllegalPositionException
IllegalPositionException
- if the internal state is illegal
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |