Added Dice Game, Fixed Mines & Balance Display on all Gambling Games
This update includes the following changes and improvements: - ✅ **Mines Game** - Added safety guards to prevent the edge-case failures that happend before. - Replaced the mine amount selector input with `+` and `–` buttons based on the suggestion. - 🎲 **Dice Game** - Integrated a new Dice game based on [this CodePen implementation](https://codepen.io/oradler/pen/zxxdqKe). - Included a sound effect for dice rolls to enhance user interaction. ( No Copyright Issues there )
This commit is contained in:
parent
11197d1382
commit
39991cb6c3
12 changed files with 780 additions and 67 deletions
|
|
@ -9,6 +9,7 @@
|
|||
import SignInConfirmDialog from '$lib/components/self/SignInConfirmDialog.svelte';
|
||||
import { Button } from '$lib/components/ui/button';
|
||||
import SEO from '$lib/components/self/SEO.svelte';
|
||||
import Dice from '$lib/components/self/games/Dice.svelte'
|
||||
|
||||
let shouldSignIn = $state(false);
|
||||
let balance = $state(0);
|
||||
|
|
@ -78,6 +79,12 @@
|
|||
>
|
||||
Mines
|
||||
</Button>
|
||||
<Button
|
||||
variant={activeGame === 'dice' ? 'default' : 'outline'}
|
||||
onclick={() => (activeGame = 'dice')}
|
||||
>
|
||||
Dice
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<!-- Game Content -->
|
||||
|
|
@ -87,6 +94,8 @@
|
|||
<Slots bind:balance onBalanceUpdate={handleBalanceUpdate} />
|
||||
{:else if activeGame === 'mines'}
|
||||
<Mines bind:balance onBalanceUpdate={handleBalanceUpdate} />
|
||||
{:else if activeGame === 'dice'}
|
||||
<Dice bind:balance onBalanceUpdate={handleBalanceUpdate} />
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
|||
Reference in a new issue