java.lang.Object
app.chess.rules.StandardValidator
- All Implemented Interfaces:
Validator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLegalMoves
(ChessPiece piece, ChessPiece[][] board) Ger legal moves of the piece using default rulesgetLegalMoves
(ChessPiece piece, ChessPiece[][] board, Collection<Rule> rules) Get legal moves of the piece using supplied rules
-
Constructor Details
-
StandardValidator
public StandardValidator()
-
-
Method Details
-
getLegalMoves
public List<ChessMove> getLegalMoves(ChessPiece piece, ChessPiece[][] board, Collection<Rule> rules) Description copied from interface:Validator
Get legal moves of the piece using supplied rules- Specified by:
getLegalMoves
in interfaceValidator
-
getLegalMoves
Description copied from interface:Validator
Ger legal moves of the piece using default rules- Specified by:
getLegalMoves
in interfaceValidator
-
getDefaultRules
- Specified by:
getDefaultRules
in interfaceValidator
-