From a573aef9e35ddeedfa4c723277b2bf019798bb87 Mon Sep 17 00:00:00 2001 From: Simon Cambier Date: Wed, 31 Jan 2024 13:05:30 +0100 Subject: [PATCH] Fixed bug where both difficulties had the same final result --- src/views/GameView.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/GameView.vue b/src/views/GameView.vue index e443e7d..77cb789 100644 --- a/src/views/GameView.vue +++ b/src/views/GameView.vue @@ -193,6 +193,11 @@ function selectOperator(o: OperatorType): void { function reboot(): void { gameState.value = GameStateType.Playing + if (gameDifficulty.value === GameDifficultyType.Hard) { + // Run an empty rand() call to make sure that both Normal and Hard have different expected results + random() + } + const minValue = 101 const numPlaquettes = isHardMode.value || isPracticeMode.value ? 6 : 5 do {