From b0ae56b247afb71801c5ddb2fb50851a01f35a79 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)