* Fixed puzzle generator outputting invalid combinations due to the lack of floor division
This commit is contained in:
LoafyLemon 2023-07-26 22:50:01 +01:00
parent a343610eb3
commit b0ae56b247

View File

@ -23,7 +23,7 @@ init python:
if (grid % 2 == 1):
is_solvable = (inversions % 2 == 0)
else:
blank_row = grid - (puzzle.index(blank) / grid)
blank_row = grid - (puzzle.index(blank) // grid)
is_solvable = (inversions % 2 != blank_row % 2)
too_difficult = (inversions <= difficulty)