inblock: (fix) winning the level always counting as a move, even if the winning block was moved last turn
- Commit
858fb7f9859e07c46368eb1d0cd6f31a1ae137cd- Author
- toast <[email protected]>
- When
- 2026-03-11 07:36 UTC (9 months ago)
- Parents
81f0bca
the machine is correct Co-authored-by: Copilot <[email protected]>
Diff
games/unblockjam/src/main/java/com/vayunmathur/games/unblockjam/MainActivity.kt
diff --git a/games/unblockjam/src/main/java/com/vayunmathur/games/unblockjam/MainActivity.kt b/games/unblockjam/src/main/java/com/vayunmathur/games/unblockjam/MainActivity.ktindex a07b13054b..62a732b95b 100644--- a/games/unblockjam/src/main/java/com/vayunmathur/games/unblockjam/MainActivity.kt+++ b/games/unblockjam/src/main/java/com/vayunmathur/games/unblockjam/MainActivity.kt@@ -79,7 +79,9 @@ fun GameScreen(completedLevelsRepository: CompletedLevelsRepository) { } fun getCurrentMoves(): Int {- return history.size + if (isLevelWon) 1 else 0+ val winningMoveIncrement =+ if (isLevelWon && currentLevelData.lastMovedBlockIndex != 0) 1 else 0+ return history.size + winningMoveIncrement } LaunchedEffect(Unit) {