MCPcopy Create free account
hub / github.com/coding-parrot/chess-engine / getMoveList

Method getMoveList

src/main/java/pieces/King.java:17–21  ·  view source on GitHub ↗
(Board board, Piece piece)

Source from the content-addressed store, hash-verified

15 public static final int MAX_DISTANCE = 1;
16
17 public static LegalMoves getMoveList(Board board, Piece piece) {
18 final LegalMoves legalMoves = Utils.getMoves(board, MAX_DISTANCE, movement, piece);
19 filterIllegalMoves(board, legalMoves.moves, piece);
20 return legalMoves;
21 }
22
23 private static void filterIllegalMoves(Board board, Set<Move> moves, Piece king) {
24 final Set<Cell> illegalSquares = getIllegalSquares(board, Color.opponent(king.color),

Callers 3

getMoveListMethod · 0.95
getLegalMovesMethod · 0.95
getIllegalSquaresMethod · 0.45

Calls 2

getMovesMethod · 0.95
filterIllegalMovesMethod · 0.95

Tested by

no test coverage detected