Find Chess960 starting position identifier: Difference between revisions

m
m (Removed a blank line.)
m (→‎{{header|Wren}}: Minor tidy)
 
(One intermediate revision by one other user not shown)
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));
 
}
Line 1,109 ⟶ 1,114:
=={{header|Wren}}==
{{libheader|Wren-iterate}}
<syntaxhighlight lang="ecmascriptwren">import "./iterate" for Indexed
 
var glyphs = "♜♞♝♛♚♖♘♗♕♔".toList
9,479

edits