madansa7 commited on
Commit
3b292ad
·
verified ·
1 Parent(s): e0cb2ba

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +298 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Housie
3
- emoji: 🔥
4
- colorFrom: pink
5
- colorTo: purple
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: housie
3
+ emoji: 🐳
4
+ colorFrom: blue
5
+ colorTo: pink
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,298 @@
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>Housie Game</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap" rel="stylesheet">
9
+ <style>
10
+ @keyframes spin {
11
+ 0% { transform: scale(0.8) rotate(-10deg); opacity: 0; }
12
+ 50% { transform: scale(1.1) rotate(5deg); }
13
+ 100% { transform: scale(1) rotate(0deg); opacity: 1; }
14
+ }
15
+ @keyframes pulse {
16
+ 0% { transform: scale(1); }
17
+ 50% { transform: scale(1.05); }
18
+ 100% { transform: scale(1); }
19
+ }
20
+ .spin-animation {
21
+ animation: spin 0.5s ease-out;
22
+ }
23
+ .pulse-animation {
24
+ animation: pulse 1s infinite;
25
+ }
26
+ .highlight-number {
27
+ background-color: #f59e0b;
28
+ color: white;
29
+ font-weight: bold;
30
+ transform: scale(1.1);
31
+ box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
32
+ }
33
+ .number-cell {
34
+ transition: all 0.3s ease;
35
+ }
36
+ .number-cell:hover {
37
+ transform: scale(1.05);
38
+ }
39
+ body {
40
+ font-family: 'Poppins', sans-serif;
41
+ background-color: #1e40af;
42
+ color: white;
43
+ }
44
+ .glow-text {
45
+ text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
46
+ }
47
+ </style>
48
+ </head>
49
+ <body class="min-h-screen flex flex-col">
50
+ <!-- Welcome Screen -->
51
+ <div id="welcomeScreen" class="fixed inset-0 bg-blue-900 bg-opacity-95 flex flex-col items-center justify-center z-50 transition-opacity duration-500">
52
+ <div class="text-center px-4">
53
+ <h1 class="text-6xl md:text-8xl font-bold mb-6 text-yellow-300 glow-text">HOUSIE!</h1>
54
+ <p class="text-2xl md:text-3xl mb-8">Let's Play Tambola!</p>
55
+ <div class="max-w-2xl mx-auto bg-blue-800 p-6 rounded-xl shadow-xl mb-8">
56
+ <h2 class="text-xl font-semibold mb-4">How to Play:</h2>
57
+ <ul class="text-left space-y-2 text-lg">
58
+ <li>• The host will call out random numbers from 1 to 90</li>
59
+ <li>• Mark the numbers on your ticket when they're called</li>
60
+ <li>• First to complete a line wins! Then full house!</li>
61
+ </ul>
62
+ </div>
63
+ <button id="startGameBtn" class="bg-yellow-400 hover:bg-yellow-300 text-blue-900 font-bold py-4 px-8 rounded-full text-xl md:text-2xl transition-all transform hover:scale-105 shadow-lg">
64
+ START GAME
65
+ </button>
66
+ </div>
67
+ </div>
68
+
69
+ <!-- Main Game Container -->
70
+ <div id="gameContainer" class="flex-1 flex flex-col p-4 md:p-8 hidden">
71
+ <!-- Header -->
72
+ <header class="flex justify-between items-center mb-6">
73
+ <div class="text-2xl font-bold text-yellow-300">HOUSIE GAME</div>
74
+ <div class="flex space-x-4">
75
+ <button id="resetGameBtn" class="bg-red-500 hover:bg-red-400 text-white px-4 py-2 rounded-lg transition-all">
76
+ Reset Game
77
+ </button>
78
+ <button id="undoBtn" class="bg-gray-500 hover:bg-gray-400 text-white px-4 py-2 rounded-lg transition-all">
79
+ Undo Last
80
+ </button>
81
+ <button id="showAllBtn" class="bg-green-500 hover:bg-green-400 text-white px-4 py-2 rounded-lg transition-all">
82
+ Show All
83
+ </button>
84
+ </div>
85
+ </header>
86
+
87
+ <!-- Main Game Area -->
88
+ <div class="flex-1 flex flex-col lg:flex-row gap-6">
89
+ <!-- Current Number Display -->
90
+ <div class="lg:w-1/3 flex flex-col items-center justify-center">
91
+ <div class="mb-4 text-2xl font-semibold">Current Number</div>
92
+ <div id="currentNumberDisplay" class="w-64 h-64 bg-white rounded-full flex items-center justify-center shadow-xl mb-6">
93
+ <span id="currentNumber" class="text-8xl font-bold text-blue-900">-</span>
94
+ </div>
95
+ <div class="text-xl mb-4">
96
+ Numbers left: <span id="numbersLeft" class="font-bold">90</span>
97
+ </div>
98
+ <button id="nextNumberBtn" class="bg-yellow-400 hover:bg-yellow-300 text-blue-900 font-bold py-4 px-12 rounded-full text-2xl transition-all transform hover:scale-105 shadow-lg">
99
+ NEXT NUMBER
100
+ </button>
101
+ </div>
102
+
103
+ <!-- History Board -->
104
+ <div class="lg:w-2/3">
105
+ <div class="text-2xl font-semibold mb-4 text-center">Called Numbers</div>
106
+ <div id="historyBoard" class="grid grid-cols-10 gap-2 bg-blue-800 bg-opacity-50 p-4 rounded-xl">
107
+ <!-- Numbers will be inserted here by JavaScript -->
108
+ </div>
109
+ </div>
110
+ </div>
111
+
112
+ <!-- Full List Modal -->
113
+ <div id="fullListModal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 hidden">
114
+ <div class="bg-blue-900 p-6 rounded-xl max-w-4xl w-full max-h-screen overflow-y-auto">
115
+ <div class="flex justify-between items-center mb-4">
116
+ <h2 class="text-2xl font-bold">All Called Numbers</h2>
117
+ <button id="closeFullListBtn" class="text-white hover:text-yellow-300 text-2xl">&times;</button>
118
+ </div>
119
+ <div id="fullListContainer" class="grid grid-cols-10 gap-2">
120
+ <!-- Numbers will be inserted here by JavaScript -->
121
+ </div>
122
+ </div>
123
+ </div>
124
+ </div>
125
+
126
+ <audio id="numberSound" src="https://assets.mixkit.co/sfx/preview/mixkit-arcade-game-jump-coin-216.mp3"></audio>
127
+ <audio id="startSound" src="https://assets.mixkit.co/sfx/preview/mixkit-game-show-suspense-waiting-668.mp3"></audio>
128
+
129
+ <script>
130
+ // Game state
131
+ const gameState = {
132
+ calledNumbers: [],
133
+ remainingNumbers: Array.from({length: 90}, (_, i) => i + 1),
134
+ isGameStarted: false
135
+ };
136
+
137
+ // DOM elements
138
+ const welcomeScreen = document.getElementById('welcomeScreen');
139
+ const gameContainer = document.getElementById('gameContainer');
140
+ const currentNumberDisplay = document.getElementById('currentNumberDisplay');
141
+ const currentNumber = document.getElementById('currentNumber');
142
+ const historyBoard = document.getElementById('historyBoard');
143
+ const numbersLeft = document.getElementById('numbersLeft');
144
+ const nextNumberBtn = document.getElementById('nextNumberBtn');
145
+ const resetGameBtn = document.getElementById('resetGameBtn');
146
+ const undoBtn = document.getElementById('undoBtn');
147
+ const showAllBtn = document.getElementById('showAllBtn');
148
+ const startGameBtn = document.getElementById('startGameBtn');
149
+ const fullListModal = document.getElementById('fullListModal');
150
+ const fullListContainer = document.getElementById('fullListContainer');
151
+ const closeFullListBtn = document.getElementById('closeFullListBtn');
152
+ const numberSound = document.getElementById('numberSound');
153
+ const startSound = document.getElementById('startSound');
154
+
155
+ // Initialize the history board
156
+ function initializeHistoryBoard() {
157
+ historyBoard.innerHTML = '';
158
+ for (let i = 1; i <= 90; i++) {
159
+ const numberCell = document.createElement('div');
160
+ numberCell.className = 'number-cell w-10 h-10 md:w-12 md:h-12 flex items-center justify-center rounded-lg bg-blue-700 cursor-pointer';
161
+ numberCell.textContent = i;
162
+ numberCell.id = `number-${i}`;
163
+ historyBoard.appendChild(numberCell);
164
+ }
165
+ }
166
+
167
+ // Call a new random number
168
+ function callNextNumber() {
169
+ if (gameState.remainingNumbers.length === 0) {
170
+ alert('All numbers have been called!');
171
+ return;
172
+ }
173
+
174
+ // Randomly select a number from remaining numbers
175
+ const randomIndex = Math.floor(Math.random() * gameState.remainingNumbers.length);
176
+ const calledNumber = gameState.remainingNumbers[randomIndex];
177
+
178
+ // Update game state
179
+ gameState.calledNumbers.push(calledNumber);
180
+ gameState.remainingNumbers.splice(randomIndex, 1);
181
+
182
+ // Update UI
183
+ updateCurrentNumberDisplay(calledNumber);
184
+ updateHistoryBoard();
185
+ updateNumbersLeft();
186
+
187
+ // Play sound
188
+ numberSound.currentTime = 0;
189
+ numberSound.play();
190
+ }
191
+
192
+ // Update the current number display with animation
193
+ function updateCurrentNumberDisplay(number) {
194
+ currentNumberDisplay.classList.add('spin-animation');
195
+ setTimeout(() => {
196
+ currentNumber.textContent = number;
197
+ currentNumberDisplay.classList.remove('spin-animation');
198
+ }, 200);
199
+ }
200
+
201
+ // Update the history board
202
+ function updateHistoryBoard() {
203
+ // Clear previous highlights
204
+ document.querySelectorAll('.number-cell').forEach(cell => {
205
+ cell.classList.remove('highlight-number');
206
+ });
207
+
208
+ // Highlight all called numbers
209
+ gameState.calledNumbers.forEach(num => {
210
+ const cell = document.getElementById(`number-${num}`);
211
+ if (cell) {
212
+ cell.classList.add('bg-green-500', 'text-white');
213
+ }
214
+ });
215
+
216
+ // Highlight the most recent number
217
+ if (gameState.calledNumbers.length > 0) {
218
+ const lastCalled = gameState.calledNumbers[gameState.calledNumbers.length - 1];
219
+ const lastCell = document.getElementById(`number-${lastCalled}`);
220
+ if (lastCell) {
221
+ lastCell.classList.add('highlight-number');
222
+ }
223
+ }
224
+ }
225
+
226
+ // Update the numbers left counter
227
+ function updateNumbersLeft() {
228
+ numbersLeft.textContent = gameState.remainingNumbers.length;
229
+ }
230
+
231
+ // Reset the game
232
+ function resetGame() {
233
+ gameState.calledNumbers = [];
234
+ gameState.remainingNumbers = Array.from({length: 90}, (_, i) => i + 1);
235
+ gameState.isGameStarted = false;
236
+
237
+ currentNumber.textContent = '-';
238
+ initializeHistoryBoard();
239
+ updateNumbersLeft();
240
+
241
+ welcomeScreen.classList.remove('hidden');
242
+ gameContainer.classList.add('hidden');
243
+ }
244
+
245
+ // Undo the last called number
246
+ function undoLastNumber() {
247
+ if (gameState.calledNumbers.length === 0) return;
248
+
249
+ const lastCalled = gameState.calledNumbers.pop();
250
+ gameState.remainingNumbers.push(lastCalled);
251
+ gameState.remainingNumbers.sort((a, b) => a - b);
252
+
253
+ if (gameState.calledNumbers.length === 0) {
254
+ currentNumber.textContent = '-';
255
+ } else {
256
+ currentNumber.textContent = gameState.calledNumbers[gameState.calledNumbers.length - 1];
257
+ }
258
+
259
+ updateHistoryBoard();
260
+ updateNumbersLeft();
261
+ }
262
+
263
+ // Show all called numbers in a modal
264
+ function showAllCalledNumbers() {
265
+ fullListContainer.innerHTML = '';
266
+ gameState.calledNumbers.forEach(num => {
267
+ const numberCell = document.createElement('div');
268
+ numberCell.className = 'number-cell w-10 h-10 md:w-12 md:h-12 flex items-center justify-center rounded-lg bg-green-500 text-white';
269
+ numberCell.textContent = num;
270
+ fullListContainer.appendChild(numberCell);
271
+ });
272
+ fullListModal.classList.remove('hidden');
273
+ }
274
+
275
+ // Start the game
276
+ function startGame() {
277
+ startSound.play();
278
+ welcomeScreen.classList.add('hidden');
279
+ gameContainer.classList.remove('hidden');
280
+ gameState.isGameStarted = true;
281
+ initializeHistoryBoard();
282
+ }
283
+
284
+ // Event listeners
285
+ nextNumberBtn.addEventListener('click', callNextNumber);
286
+ resetGameBtn.addEventListener('click', resetGame);
287
+ undoBtn.addEventListener('click', undoLastNumber);
288
+ showAllBtn.addEventListener('click', showAllCalledNumbers);
289
+ startGameBtn.addEventListener('click', startGame);
290
+ closeFullListBtn.addEventListener('click', () => {
291
+ fullListModal.classList.add('hidden');
292
+ });
293
+
294
+ // Initialize the game
295
+ initializeHistoryBoard();
296
+ </script>
297
+ <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=madansa7/housie" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
298
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Create a web-based Housie (Tambola) number-calling game interface intended for use in physical gatherings, such as community events or family functions. The interface will be projected or displayed on a large screen for all participants to view while holding physical Housie tickets. Here's what the game interface must include: Core Functionality: A random number generator that picks unique numbers from 1 to 99. No repetition is allowed. A large, prominent display of the current number drawn, with an animation or “spin” effect to simulate a physical draw for excitement and suspense. A manual control button (e.g., "Next Number") that the host will click to trigger the next number. No auto-play. Supporting Features: A History Board: Displays all previously drawn numbers in a clear grid format (e.g., 10x10 layout). Highlight the most recent number (e.g., using a different color or animation). Numbers should be color-coded or visually distinct once drawn. A Welcome/Start Screen: Display the event name or "Let’s Play Housie!" banner. Instructions or a brief intro screen before starting. A Game Status: Number of remaining balls (e.g., "Numbers left: 73") Optionally show how many numbers have been drawn. Aesthetic & User Experience: Bright, engaging visuals suitable for a fun crowd (e.g., playful fonts, celebratory colors). Audio cues (e.g., bell or “ding” sound) when a new number is drawn (optional). Responsive layout that works well on laptops, desktops, or smart TVs. Minimalist controls for the host; the audience should not need to interact. Admin / Host Controls: Option to reset the game. Option to undo last number in case of a mistake. Button to reveal full list of drawn numbers at any time.