Generate Chess960 starting position: Difference between revisions

→‎{{header|Perl 6}}: simplifying with the one Junction
(→‎{{header|Perl 6}}: Some explanations + using a SetHash + rewriting)
(→‎{{header|Perl 6}}: simplifying with the one Junction)
Line 96:
my @knights = $squares.grab(2);
my ($queen, @bishops) = $squares.grab(3);
if($queen, @bishops[0]) .all= %%reverse 2 orunless @bishops.allone %% 2 {;
($queen, @bishops[0]) .= reverse
}
 
(my @squares)[$king, $queen, @rooks, @bishops, @knights] =
1,934

edits