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

Method castlingAllowanceFen

src/main/java/game/Board.java:946–961  ·  view source on GitHub ↗
(boolean[][] canCastle)

Source from the content-addressed store, hash-verified

944 }
945
946 private String castlingAllowanceFen(boolean[][] canCastle) {
947 String result = "";
948 if (canCastle[0][1]) {
949 result = result + "K";
950 }
951 if (canCastle[0][0]) {
952 result = result + "Q";
953 }
954 if (canCastle[1][1]) {
955 result = result + "k";
956 }
957 if (canCastle[1][0]) {
958 result = result + "q";
959 }
960 return result.equals("") ? "-" : result;
961 }
962
963 private static class Reference<T> {
964 T object;

Callers 1

fenRepresentationMethod · 0.95

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected