@Component public class ChessRulesImpl extends Object implements ChessRules
| Constructor and Description |
|---|
ChessRulesImpl() |
| Modifier and Type | Method and Description |
|---|---|
Set<ChessBoardCoord> |
getAttackingPieces(ChessPosition position,
ChessBoardCoord squarePosition) |
Set<ChessMovePath> |
getAvailableMoves(ChessPosition position) |
ChessPosition |
getInitialPosition() |
Set<ChessBoardCoord> |
getReachableDestinations(ChessPosition position,
ChessBoardCoord pieceCoords,
boolean excludeCheckSituations) |
ChessGameStatus |
getStatus(ChessPosition position) |
List<ChessBoardUpdate> |
getUpdatesForMove(ChessPosition position,
ChessMovePath path) |
public Set<ChessMovePath> getAvailableMoves(ChessPosition position)
getAvailableMoves in interface ChessRulespublic Set<ChessBoardCoord> getReachableDestinations(ChessPosition position, ChessBoardCoord pieceCoords, boolean excludeCheckSituations)
getReachableDestinations in interface ChessRulespublic Set<ChessBoardCoord> getAttackingPieces(ChessPosition position, ChessBoardCoord squarePosition)
getAttackingPieces in interface ChessRulespublic ChessPosition getInitialPosition()
getInitialPosition in interface ChessRulespublic ChessGameStatus getStatus(ChessPosition position)
getStatus in interface ChessRulespublic List<ChessBoardUpdate> getUpdatesForMove(ChessPosition position, ChessMovePath path) throws IllegalMoveException
getUpdatesForMove in interface ChessRulesIllegalMoveExceptionCopyright © 2016. All Rights Reserved.