1developerintheworld commited on
Commit
0263988
Β·
verified Β·
1 Parent(s): b046a9d

change "your balance" from 1000 to 200k - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +331 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Gamling
3
- emoji: πŸ¦€
4
- colorFrom: gray
5
- colorTo: green
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: gamling
3
+ emoji: 🐳
4
+ colorFrom: pink
5
+ colorTo: red
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,331 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Fruit Spin - Fun Gambling Game</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ @keyframes spin {
11
+ 0% { transform: translateY(0); }
12
+ 100% { transform: translateY(-100%); }
13
+ }
14
+
15
+ .slot-wheel {
16
+ height: 100px;
17
+ overflow: hidden;
18
+ position: relative;
19
+ }
20
+
21
+ .slot-items {
22
+ position: absolute;
23
+ width: 100%;
24
+ transition: transform 3s cubic-bezier(0.17, 0.85, 0.45, 1);
25
+ }
26
+
27
+ .slot-item {
28
+ height: 100px;
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: center;
32
+ font-size: 3rem;
33
+ }
34
+
35
+ .win-animation {
36
+ animation: pulse 0.5s infinite alternate;
37
+ }
38
+
39
+ @keyframes pulse {
40
+ from { box-shadow: 0 0 5px rgba(255, 255, 255, 0.5); }
41
+ to { box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
42
+ }
43
+
44
+ .coin {
45
+ transition: all 0.3s ease;
46
+ }
47
+
48
+ .coin:hover {
49
+ transform: scale(1.1);
50
+ }
51
+
52
+ .coin:active {
53
+ transform: scale(0.9);
54
+ }
55
+ </style>
56
+ </head>
57
+ <body class="bg-gradient-to-b from-blue-900 to-purple-900 min-h-screen text-white">
58
+ <div class="container mx-auto px-4 py-8">
59
+ <header class="text-center mb-8">
60
+ <h1 class="text-4xl md:text-6xl font-bold mb-2 bg-clip-text text-transparent bg-gradient-to-r from-yellow-400 to-red-500">
61
+ πŸ’ Fruit Spin
62
+ </h1>
63
+ <p class="text-lg text-gray-300">A fun gambling game with no real money involved</p>
64
+ </header>
65
+
66
+ <div class="max-w-3xl mx-auto bg-gray-800 bg-opacity-50 rounded-xl shadow-2xl overflow-hidden backdrop-blur-sm">
67
+ <div class="p-6">
68
+ <!-- Balance Display -->
69
+ <div class="flex justify-between items-center mb-8 p-4 bg-gray-900 rounded-lg">
70
+ <div>
71
+ <h2 class="text-xl font-semibold">Your Balance</h2>
72
+ <p class="text-3xl font-bold text-yellow-400" id="balance">200000</p>
73
+ </div>
74
+ <div class="flex space-x-2">
75
+ <button id="reset-btn" class="px-4 py-2 bg-red-600 hover:bg-red-700 rounded-lg font-medium transition">
76
+ <i class="fas fa-sync-alt mr-2"></i>Reset
77
+ </button>
78
+ </div>
79
+ </div>
80
+
81
+ <!-- Bet Controls -->
82
+ <div class="mb-8 p-4 bg-gray-900 rounded-lg">
83
+ <h2 class="text-xl font-semibold mb-4">Place Your Bet</h2>
84
+ <div class="flex flex-wrap items-center justify-between">
85
+ <div class="flex space-x-2 mb-4 md:mb-0">
86
+ <button class="coin px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg font-medium transition" data-bet="10">
87
+ <i class="fas fa-coins mr-2"></i>10
88
+ </button>
89
+ <button class="coin px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg font-medium transition" data-bet="50">
90
+ <i class="fas fa-coins mr-2"></i>50
91
+ </button>
92
+ <button class="coin px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg font-medium transition" data-bet="100">
93
+ <i class="fas fa-coins mr-2"></i>100
94
+ </button>
95
+ </div>
96
+ <div class="flex items-center">
97
+ <span class="mr-2">Bet Amount:</span>
98
+ <input type="number" id="bet-amount" value="10" min="10" max="1000000" class="w-24 px-3 py-2 bg-gray-800 rounded-lg text-white border border-gray-700">
99
+ </div>
100
+ </div>
101
+ </div>
102
+
103
+ <!-- Slot Machine -->
104
+ <div class="mb-8">
105
+ <div class="flex justify-center space-x-2 md:space-x-4 mb-6">
106
+ <div class="slot-wheel w-24 md:w-32 bg-gray-900 rounded-lg overflow-hidden border-2 border-yellow-500" id="wheel1">
107
+ <div class="slot-items" id="items1"></div>
108
+ </div>
109
+ <div class="slot-wheel w-24 md:w-32 bg-gray-900 rounded-lg overflow-hidden border-2 border-yellow-500" id="wheel2">
110
+ <div class="slot-items" id="items2"></div>
111
+ </div>
112
+ <div class="slot-wheel w-24 md:w-32 bg-gray-900 rounded-lg overflow-hidden border-2 border-yellow-500" id="wheel3">
113
+ <div class="slot-items" id="items3"></div>
114
+ </div>
115
+ </div>
116
+ <div class="text-center">
117
+ <button id="spin-btn" class="px-8 py-4 bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 rounded-full text-xl font-bold uppercase tracking-wider shadow-lg transition transform hover:scale-105">
118
+ <i class="fas fa-play mr-2"></i> Spin
119
+ </button>
120
+ </div>
121
+ </div>
122
+
123
+ <!-- Results -->
124
+ <div id="result" class="hidden p-4 bg-gray-900 rounded-lg mb-4 text-center">
125
+ <h2 class="text-2xl font-bold mb-2" id="result-text"></h2>
126
+ <p class="text-xl" id="win-amount"></p>
127
+ </div>
128
+
129
+ <!-- Game Info -->
130
+ <div class="bg-gray-900 bg-opacity-70 rounded-lg p-4">
131
+ <h2 class="text-xl font-semibold mb-2">How to Play</h2>
132
+ <ul class="list-disc pl-5 space-y-1 text-gray-300">
133
+ <li>Set your bet amount using the buttons or input field</li>
134
+ <li>Click SPIN to start the game</li>
135
+ <li>Match 3 symbols to win!</li>
136
+ <li>πŸ’πŸ’πŸ’ = 5x | 🍊🍊 = 10x | πŸ‹πŸ‹ = 15x | πŸ‰πŸ‰ = 20x | 7️⃣7️⃣7️⃣ = 50x</li>
137
+ </ul>
138
+ </div>
139
+ </div>
140
+ </div>
141
+
142
+ <footer class="text-center mt-8 text-gray-400 text-sm">
143
+ <p>This is a fake gambling game for entertainment purposes only. No real money is used or won.</p>
144
+ </footer>
145
+ </div>
146
+
147
+ <script>
148
+ document.addEventListener('DOMContentLoaded', function() {
149
+ // Game variables
150
+ let balance = 200000;
151
+ let currentBet = 10;
152
+ let isSpinning = false;
153
+
154
+ // Fruit symbols
155
+ const symbols = ['πŸ’', '🍊', 'πŸ‹', 'πŸ‰', '7️⃣'];
156
+ const payouts = {
157
+ 'πŸ’πŸ’πŸ’': 5,
158
+ '🍊🍊🍊': 10,
159
+ 'πŸ‹πŸ‹πŸ‹': 15,
160
+ 'πŸ‰πŸ‰πŸ‰': 20,
161
+ '7️⃣7️⃣7️⃣': 50
162
+ };
163
+
164
+ // DOM elements
165
+ const balanceEl = document.getElementById('balance');
166
+ const betAmountInput = document.getElementById('bet-amount');
167
+ const spinBtn = document.getElementById('spin-btn');
168
+ const resetBtn = document.getElementById('reset-btn');
169
+ const resultEl = document.getElementById('result');
170
+ const resultTextEl = document.getElementById('result-text');
171
+ const winAmountEl = document.getElementById('win-amount');
172
+ const wheels = [
173
+ document.getElementById('wheel1'),
174
+ document.getElementById('wheel2'),
175
+ document.getElementById('wheel3')
176
+ ];
177
+ const itemsContainers = [
178
+ document.getElementById('items1'),
179
+ document.getElementById('items2'),
180
+ document.getElementById('items3')
181
+ ];
182
+
183
+ // Initialize slot items
184
+ function initSlots() {
185
+ itemsContainers.forEach(container => {
186
+ container.innerHTML = '';
187
+ // Add extra items for smooth spinning
188
+ for (let i = 0; i < 20; i++) {
189
+ const randomSymbol = symbols[Math.floor(Math.random() * symbols.length)];
190
+ const item = document.createElement('div');
191
+ item.className = 'slot-item';
192
+ item.textContent = randomSymbol;
193
+ container.appendChild(item);
194
+ }
195
+ });
196
+ }
197
+
198
+ // Update balance display
199
+ function updateBalance() {
200
+ balanceEl.textContent = balance;
201
+ }
202
+
203
+ // Handle bet buttons
204
+ document.querySelectorAll('.coin').forEach(button => {
205
+ button.addEventListener('click', function() {
206
+ currentBet = parseInt(this.dataset.bet);
207
+ betAmountInput.value = currentBet;
208
+ });
209
+ });
210
+
211
+ // Handle bet amount input
212
+ betAmountInput.addEventListener('change', function() {
213
+ currentBet = parseInt(this.value);
214
+ if (currentBet < 10) currentBet = 10;
215
+ if (currentBet > 10000) currentBet = 10000;
216
+ if (currentBet > balance) currentBet = balance;
217
+ this.value = currentBet;
218
+ });
219
+
220
+ // Spin the wheels
221
+ function spin() {
222
+ if (isSpinning || currentBet > balance || currentBet < 10 || currentBet > 1000000) return;
223
+
224
+ isSpinning = true;
225
+ balance -= currentBet;
226
+ updateBalance();
227
+ resultEl.classList.add('hidden');
228
+
229
+ // Reset wheels to top position
230
+ itemsContainers.forEach(container => {
231
+ container.style.transform = 'translateY(0)';
232
+ });
233
+
234
+ // Generate random positions for each wheel
235
+ const spins = [
236
+ Math.floor(Math.random() * symbols.length),
237
+ Math.floor(Math.random() * symbols.length),
238
+ Math.floor(Math.random() * symbols.length)
239
+ ];
240
+
241
+ // 10% chance for a winning combination (for demo purposes)
242
+ if (Math.random() < 0.3) {
243
+ const winningSymbol = symbols[Math.floor(Math.random() * symbols.length)];
244
+ spins[0] = symbols.indexOf(winningSymbol);
245
+ spins[1] = symbols.indexOf(winningSymbol);
246
+ spins[2] = symbols.indexOf(winningSymbol);
247
+ }
248
+
249
+ // Calculate final positions
250
+ const positions = spins.map(spin => {
251
+ return -((spin + 1) * 100 + Math.floor(Math.random() * 10) * 100);
252
+ });
253
+
254
+ // Animate wheels
255
+ itemsContainers.forEach((container, index) => {
256
+ setTimeout(() => {
257
+ container.style.transform = `translateY(${positions[index]}px)`;
258
+ }, 100 * index);
259
+ });
260
+
261
+ // Check result after animation
262
+ setTimeout(() => {
263
+ checkResult(spins);
264
+ isSpinning = false;
265
+ }, 3500);
266
+ }
267
+
268
+ // Check the spin result
269
+ function checkResult(spins) {
270
+ const result = [
271
+ symbols[spins[0]],
272
+ symbols[spins[1]],
273
+ symbols[spins[2]]
274
+ ].join('');
275
+
276
+ resultEl.classList.remove('hidden');
277
+
278
+ if (payouts[result]) {
279
+ const winAmount = currentBet * payouts[result];
280
+ balance += winAmount;
281
+ updateBalance();
282
+
283
+ resultTextEl.textContent = 'YOU WIN!';
284
+ resultTextEl.className = 'text-2xl font-bold mb-2 text-green-400';
285
+ winAmountEl.textContent = `+${winAmount} coins!`;
286
+ winAmountEl.className = 'text-xl text-yellow-400';
287
+
288
+ // Add win animation to wheels
289
+ wheels.forEach(wheel => {
290
+ wheel.classList.add('win-animation');
291
+ setTimeout(() => {
292
+ wheel.classList.remove('win-animation');
293
+ }, 2000);
294
+ });
295
+ } else {
296
+ resultTextEl.textContent = 'TRY AGAIN!';
297
+ resultTextEl.className = 'text-2xl font-bold mb-2 text-red-400';
298
+ winAmountEl.textContent = `Better luck next time!`;
299
+ winAmountEl.className = 'text-xl text-gray-300';
300
+ }
301
+ }
302
+
303
+ // Reset game
304
+ function resetGame() {
305
+ balance = 200000;
306
+ currentBet = 10;
307
+ betAmountInput.value = currentBet;
308
+ updateBalance();
309
+ resultEl.classList.add('hidden');
310
+ initSlots();
311
+ }
312
+
313
+ // Event listeners
314
+ spinBtn.addEventListener('click', spin);
315
+ resetBtn.addEventListener('click', resetGame);
316
+
317
+ // Initialize game
318
+ initSlots();
319
+ updateBalance();
320
+
321
+ // Keyboard support
322
+ document.addEventListener('keydown', function(e) {
323
+ if (e.code === 'Space' && !isSpinning) {
324
+ e.preventDefault();
325
+ spin();
326
+ }
327
+ });
328
+ });
329
+ </script>
330
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=1developerintheworld/gamling" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
331
+ </html>