Peaceful chess queen armies: Difference between revisions
m
→{{header|Perl 6}}: tweaks
SqrtNegInf (talk | contribs) (Added Perl 6 example) |
SqrtNegInf (talk | contribs) m (→{{header|Perl 6}}: tweaks) |
||
Line 1,826:
state $solution = False;
# logic of
once {
my %Q = 'WBBW'.comb; # return the queen of alternate color
Line 1,843:
}
#
return $solution if $solution;
Line 1,856:
while $board ~~ m:nth(++$cnt)/<[◦•]>/;
▲ return $solution;
}
Line 1,864 ⟶ 1,863:
my $board = ($empty-square x $n**2).comb.rotor($n)>>.join[^$n].join: "\n";
my $solution = place
say $solution
|