You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To enable debug mode in the Fortune Tiger slot machine, open your browser console and run:
6
+
7
+
```javascript
8
+
localStorage.setItem('debug_mode', 'true');
9
+
```
10
+
11
+
Then refresh the page. You'll see a purple "🐛 Debug Spin" button in the top-left corner.
12
+
13
+
## Disabling Debug Mode
14
+
15
+
To disable debug mode:
16
+
17
+
```javascript
18
+
localStorage.removeItem('debug_mode');
19
+
// or
20
+
localStorage.setItem('debug_mode', 'false');
21
+
```
22
+
23
+
Then refresh the page.
24
+
25
+
## What Does Debug Mode Do?
26
+
27
+
The debug button allows you to test the spinning animation and transaction flow without actually:
28
+
- Connecting a wallet
29
+
- Placing a real bet
30
+
- Spending any tokens
31
+
32
+
When you click "🐛 Debug Spin", it will:
33
+
1.**Ask you to choose**: Click OK to WIN, or Cancel to LOSE
34
+
2. Start the spinning animation immediately
35
+
3. Show "CONFIRMING..." state for 2 seconds (simulating wallet confirmation)
36
+
4. Show "Transaction confirmed! Spinning..." toast
37
+
5. Continue spinning for 5 seconds (simulating blockchain confirmation)
38
+
6. Stop at the result you chose (guaranteed win or guaranteed lose)
39
+
7. If you chose WIN, show the "WINNER CHICKEN DINNER" animation
40
+
8. Play spinning sound effect (if `spin.mp3` exists in `public/sounds/`)
41
+
42
+
This is useful for:
43
+
- Testing the UI/UX flow
44
+
- Checking animations
45
+
- Debugging audio playback
46
+
- Testing the winning animation
47
+
- Demonstrating the app without needing a wallet connection
48
+
49
+
## Audio
50
+
51
+
The app will automatically play a spinning sound effect when the reels are spinning.
52
+
53
+
### Automatic Fallback Sound
54
+
55
+
**No setup required!** If the `spin.mp3` file is missing, the app will automatically generate a spinning sound using Web Audio API. You'll see this console message:
56
+
-`🔊 Playing Web Audio API fallback sound`
57
+
58
+
### Optional: Add Better Sound
59
+
60
+
For a more realistic casino experience:
61
+
62
+
1. Download a free slot machine spin sound (MP3 format)
0 commit comments