From 027f237606d19ff0f057229663d2c570e3ffa303 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Wed, 26 Jul 2023 22:50:01 +0100 Subject: [PATCH] Bug fix * Fixed puzzle generator outputting invalid combinations due to the lack of floor division --- game/scripts/minigames/puzzle.rpy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/scripts/minigames/puzzle.rpy b/game/scripts/minigames/puzzle.rpy index 22e446fa..db7a1855 100644 --- a/game/scripts/minigames/puzzle.rpy +++ b/game/scripts/minigames/puzzle.rpy @@ -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)