Find Chess960 starting position identifier: Difference between revisions
Find Chess960 starting position identifier (view source)
Revision as of 20:10, 21 July 2023
, 9 months agoSmall improvement to code.
m (Removed a blank line.) |
m (Small improvement to code.) |
||
Line 668:
createKnightsTable();
createCorrectPieces();
for ( String position : positions ) {
Line 735 ⟶ 736:
knightsTable.put(List.of(2, 4), 8);
knightsTable.put(List.of(3, 4), 9);
}
private static void createCorrectPieces() {
correctPieces = Set.of(
}
private static Map<List<Integer>, Integer> knightsTable;
private static Set<Map.Entry<Character, Integer>> correctPieces
▲ Set.of(Map.entry('R', 2), Map.entry('N', 2), Map.entry('B', 2), Map.entry('Q', 1), Map.entry('K', 1));
}
|