Sudoku: Difference between revisions
Content deleted Content added
Sudoku en FreeBASIC |
SqrtNegInf (talk | contribs) m →Raku - Finesse It: return Booleans, not integers |
||
Line 9,284:
# value for this cell
trace $level, "Backtrack, path unsolvable... (on "~($x+1)~" "~($y+1)~")";
return
}
# all cells are already solved.
Line 9,309:
# A unfilled cell is not resolved, so it shouldn't match
my multi match-resolved-cell(Array $other, Int $this) {
return
}
my multi match-resolved-cell(Int $other, Int $this) {
Line 9,328:
} elsif (@r.elems == 0) {
# This is an invalid grid
return
} else {
$sudoku[$x][$y] = @r;
Line 9,334:
}
} while $resolved; # repeat if there was any change
return
}
|