MCPcopy Index your code
hub / github.com/coding-parrot/chess-engine / getShortForm

Method getShortForm

src/main/java/commons/Piece.java:93–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91 }
92
93 public String getShortForm() {
94 switch (pieceType) {
95 case BISHOP:
96 return color == Color.WHITE ? "♝" : "♗";
97 case KNIGHT:
98 return color == Color.WHITE ? "♞" : "♘";
99 case ROOK:
100 return color == Color.WHITE ? "♜" : "♖";
101 case KING:
102 return color == Color.WHITE ? "♚" : "♔";
103 case QUEEN:
104 return color == Color.WHITE ? "♛" : "♕";
105 case PAWN:
106 return color == Color.WHITE ? "♟" : "♙";
107 default:
108 throw new IllegalStateException();
109 }
110 }
111
112
113 @Override

Callers 3

toStringMethod · 0.95
printMoveMethod · 0.80
toStringMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected