forked from SilverStudioGames/WTS
Bug fix
* Fixed puzzle generator outputting invalid combinations due to the lack of floor division
This commit is contained in:
parent
cd8b94e40c
commit
027f237606
@ -23,7 +23,7 @@ init python:
|
|||||||
if (grid % 2 == 1):
|
if (grid % 2 == 1):
|
||||||
is_solvable = (inversions % 2 == 0)
|
is_solvable = (inversions % 2 == 0)
|
||||||
else:
|
else:
|
||||||
blank_row = grid - (puzzle.index(blank) / grid)
|
blank_row = grid - (puzzle.index(blank) // grid)
|
||||||
is_solvable = (inversions % 2 != blank_row % 2)
|
is_solvable = (inversions % 2 != blank_row % 2)
|
||||||
|
|
||||||
too_difficult = (inversions <= difficulty)
|
too_difficult = (inversions <= difficulty)
|
||||||
|
Loading…
Reference in New Issue
Block a user