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

Method getMoveList

src/main/java/commons/Piece.java:55–72  ·  view source on GitHub ↗
(Board board)

Source from the content-addressed store, hash-verified

53 }
54
55 public Set<Move> getMoveList(Board board) {
56 switch (pieceType) {
57 case BISHOP:
58 return Bishop.getMoveList(board, this).moves;
59 case KNIGHT:
60 return Knight.getMoveList(board, this).moves;
61 case ROOK:
62 return Rook.getMoveList(board, this).moves;
63 case KING:
64 return King.getMoveList(board, this).moves;
65 case QUEEN:
66 return Queen.getMoveList(board, this).moves;
67 case PAWN:
68 return Pawn.getMoveList(board, this).moves;
69 default:
70 throw new IllegalStateException();
71 }
72 }
73
74 public LegalMoves getLegalMoves(Board board) {
75 switch (pieceType) {

Callers

nothing calls this directly

Calls 6

getMoveListMethod · 0.95
getMoveListMethod · 0.95
getMoveListMethod · 0.95
getMoveListMethod · 0.95
getMoveListMethod · 0.95
getMoveListMethod · 0.95

Tested by

no test coverage detected