Flipping bits game: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: simplified the program, added identifiers of the user inputs.)
m (→‎{{header|Perl 6}}: numeric sorting of rows)
Line 2,255: Line 2,255:
$string ~= sprintf "%2s ", $_ for sort keys %hash{'1'};
$string ~= sprintf "%2s ", $_ for sort keys %hash{'1'};
$string ~= "\n";
$string ~= "\n";
for sort keys %hash -> $key {
for %hash.keys.sort: +* -> $key {
$string ~= sprintf "%2s ", $key;
$string ~= sprintf "%2s ", $key;
$string ~= sprintf "%2s ", %hash{$key}{$_} for sort keys %hash{$key};
$string ~= sprintf "%2s ", %hash{$key}{$_} for sort keys %hash{$key};