Find Chess960 starting position identifier: Difference between revisions
Content deleted Content added
m Removed a blank line. |
m Small improvement to code. |
||
Line 668: | Line 668: | ||
createKnightsTable(); |
createKnightsTable(); |
||
createCorrectPieces(); |
|||
for ( String position : positions ) { |
for ( String position : positions ) { |
||
Line 735: | Line 736: | ||
knightsTable.put(List.of(2, 4), 8); |
knightsTable.put(List.of(2, 4), 8); |
||
knightsTable.put(List.of(3, 4), 9); |
knightsTable.put(List.of(3, 4), 9); |
||
} |
} |
||
private static void createCorrectPieces() { |
|||
correctPieces = Set.of( |
|||
⚫ | |||
} |
|||
private static Map<List<Integer>, Integer> knightsTable; |
private static Map<List<Integer>, Integer> knightsTable; |
||
private static Set<Map.Entry<Character, Integer>> correctPieces |
private static Set<Map.Entry<Character, Integer>> correctPieces; |
||
⚫ | |||
} |
} |