From ad1739f7f43337182724ed79fd42c016f6646312 Mon Sep 17 00:00:00 2001 From: Face <69168154+face-hh@users.noreply.github.com> Date: Tue, 24 Jun 2025 12:46:38 +0300 Subject: [PATCH] clean mines component --- .../lib/components/self/games/Mines.svelte | 194 ++++++------------ 1 file changed, 58 insertions(+), 136 deletions(-) diff --git a/website/src/lib/components/self/games/Mines.svelte b/website/src/lib/components/self/games/Mines.svelte index 5e3b9dc..41245e5 100644 --- a/website/src/lib/components/self/games/Mines.svelte +++ b/website/src/lib/components/self/games/Mines.svelte @@ -1,7 +1,7 @@ @@ -306,7 +238,6 @@ Mines Navigate through the minefield and cash out before hitting a mine! - @@ -325,20 +256,21 @@ + aria-label="Decrease mines">- { + oninput={(e) => { const target = e.target as HTMLInputElement | null; const val = Math.max( MIN_MINES, @@ -385,30 +315,24 @@ + aria-label="Increase mines">+

You will get - - {(calculateRawMultiplier( - isPlaying ? revealedTiles.length + 1 : 1, - mineCount - )).toFixed(2)}x + + {calculateRawMultiplier(isPlaying ? revealedTiles.length + 1 : 1, mineCount).toFixed( + 2 + )}x per tile, probability of winning: - - {calculateProbability( - isPlaying ? 1 : 1, - mineCount - )}% + + {calculateProbability(isPlaying ? 1 : 1, mineCount)}%

- -
- -
+ disabled={isPlaying}>Max
- -
{#if !isPlaying} {:else} - {#if hasRevealedTile}
-
-
+
+
Auto Cashout in {Math.ceil(AUTO_CASHOUT_TIME - autoCashoutTimer)}s
-
+
= 7} style="width: {autoCashoutProgress}%" >
-
+
{/if}