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

Method getLegalMoves

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

Source from the content-addressed store, hash-verified

72 }
73
74 public LegalMoves getLegalMoves(Board board) {
75 switch (pieceType) {
76 case BISHOP:
77 return Bishop.getMoveList(board, this);
78 case KNIGHT:
79 return Knight.getMoveList(board, this);
80 case ROOK:
81 return Rook.getMoveList(board, this);
82 case KING:
83 return King.getMoveList(board, this);
84 case QUEEN:
85 return Queen.getMoveList(board, this);
86 case PAWN:
87 return Pawn.getMoveList(board, this);
88 default:
89 throw new IllegalStateException();
90 }
91 }
92
93 public String getShortForm() {
94 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