|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--chesspresso.position.AbstractPosition
|
+--chesspresso.position.CompactPosition
An implementation of the position interface. The class is optimized for memory footprint. Each instance uses only 36 bytes for internal representation (plus some overhead for java internals).
| Field Summary |
| Fields inherited from class chesspresso.position.AbstractPosition |
HASH_ALL_MASK, HASH_TOPLAY_MASK, HASH_TOPLAY_MULT, s_hashCastleMod, s_hashEPMod, s_hashMod |
| Fields inherited from interface chesspresso.position.ImmutablePosition |
ALL_CASTLES, BLACK_CASTLE, BLACK_LONG_CASTLE, BLACK_SHORT_CASTLE, NO_CASTLES, WHITE_CASTLE, WHITE_LONG_CASTLE, WHITE_SHORT_CASTLE |
| Constructor Summary | |
CompactPosition()
|
|
CompactPosition(ImmutablePosition position)
|
|
| Method Summary | |
int |
getCastles()
Return the still allowed castles as mask. |
int |
getHalfMoveClock()
Return the number of moves since the last capture and the last pawn move. |
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. |
| Methods inherited from class chesspresso.position.AbstractPosition |
equals, getFEN, getHashCode, getStartPositionHashCode, hashCode, isCastlePossible, isLegal, isSquarePossibleEPSquare, isStartPosition, isWhiteToPlay, toString, validate |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CompactPosition()
public CompactPosition(ImmutablePosition position)
| Method Detail |
public int getStone(int sqi)
ImmutablePosition
sqi - the square
public int getSqiEP()
ImmutablePosition
public int getCastles()
ImmutablePosition
public int getToPlay()
ImmutablePosition
public int getPlyNumber()
ImmutablePosition
public int getHalfMoveClock()
ImmutablePosition
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||