From 06880c68e1ff93bd1019aa27545d7cb93b1e8470 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Tue, 21 Sep 2021 16:58:20 -0400 Subject: [PATCH] fix casino infinite loop --- src/Casino/Roulette.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Casino/Roulette.tsx b/src/Casino/Roulette.tsx index 11df19fcb..4ca88fa77 100644 --- a/src/Casino/Roulette.tsx +++ b/src/Casino/Roulette.tsx @@ -196,7 +196,8 @@ export class Roulette extends Game { if (playerWin && Math.random() > 0.9) { playerWin = false; while (this.state.strategy.match(n)) { - n++; + console.log("er)"); + n = (n + 1) % 36; } } if (playerWin) {