Solve a Hidato puzzle: Difference between revisions
Content added Content deleted
Line 1,943: | Line 1,943: | ||
maxrow, maxcol = size(board) |
maxrow, maxcol = size(board) |
||
for i in max(row - 1, 1):min(row + 1, maxrow), j in max(col -1, 1):min(col + 1, maxcol) |
for i in max(row - 1, 1):min(row + 1, maxrow), j in max(col -1, 1):min(col + 1, maxcol) |
||
if !(i == row && j == col) && hidatosolve(board, fixed, i, j, sought +1, next) |
if !(i == row && j == col) && hidatosolve(board, fixed, i, j, sought + 1, next) |
||
return true |
return true |
||
end |
end |