Find Chess960 starting position identifier: Difference between revisions

m
Small 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(
Set.of( Map.entry('R', 2), Map.entry('N', 2), Map.entry('B', 2), Map.entry('Q', 1), Map.entry('K', 1) );
}
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));
 
}
871

edits