KatEdwards commited on
Commit
bb3a592
·
verified ·
1 Parent(s): 03e0d2d

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +732 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Assorted Games
3
- emoji: 📚
4
- colorFrom: purple
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: assorted-games
3
+ emoji: 🐳
4
+ colorFrom: gray
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,732 @@
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>ER Emergency Room 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 pulse {
11
+ 0% { transform: scale(1); }
12
+ 50% { transform: scale(1.05); }
13
+ 100% { transform: scale(1); }
14
+ }
15
+ .pulse {
16
+ animation: pulse 1.5s infinite;
17
+ }
18
+ .fade-in {
19
+ animation: fadeIn 0.5s ease-in;
20
+ }
21
+ @keyframes fadeIn {
22
+ from { opacity: 0; }
23
+ to { opacity: 1; }
24
+ }
25
+ .heartbeat {
26
+ animation: heartbeat 1.5s ease-in-out infinite both;
27
+ }
28
+ @keyframes heartbeat {
29
+ 0% { transform: scale(1); }
30
+ 30% { transform: scale(1.1); }
31
+ 50% { transform: scale(1); }
32
+ 60% { transform: scale(1.1); }
33
+ 100% { transform: scale(1); }
34
+ }
35
+ </style>
36
+ </head>
37
+ <body class="bg-gray-100 font-sans">
38
+ <div id="app" class="min-h-screen flex flex-col">
39
+ <!-- Main Menu -->
40
+ <div id="main-menu" class="flex flex-col items-center justify-center flex-grow p-4">
41
+ <div class="bg-white rounded-xl shadow-2xl p-8 max-w-2xl w-full text-center">
42
+ <div class="flex justify-center mb-6">
43
+ <i class="fas fa-hospital text-red-500 text-6xl"></i>
44
+ </div>
45
+ <h1 class="text-4xl font-bold text-gray-800 mb-2">ER EMERGENCY ROOM</h1>
46
+ <p class="text-gray-600 mb-8">Test your skills as an ER doctor in this fast-paced medical drama game</p>
47
+
48
+ <div class="space-y-4">
49
+ <button onclick="startGame()" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-lg transition transform hover:scale-105">
50
+ <i class="fas fa-play mr-2"></i> Start Shift
51
+ </button>
52
+ <button onclick="showInstructions()" class="w-full bg-gray-200 hover:bg-gray-300 text-gray-800 font-bold py-3 px-4 rounded-lg transition transform hover:scale-105">
53
+ <i class="fas fa-info-circle mr-2"></i> Instructions
54
+ </button>
55
+ <button onclick="showCredits()" class="w-full bg-gray-200 hover:bg-gray-300 text-gray-800 font-bold py-3 px-4 rounded-lg transition transform hover:scale-105">
56
+ <i class="fas fa-star mr-2"></i> Credits
57
+ </button>
58
+ </div>
59
+ </div>
60
+ </div>
61
+
62
+ <!-- Instructions -->
63
+ <div id="instructions" class="hidden flex-col items-center justify-center flex-grow p-4">
64
+ <div class="bg-white rounded-xl shadow-2xl p-8 max-w-2xl w-full">
65
+ <div class="flex justify-between items-center mb-6">
66
+ <h2 class="text-2xl font-bold text-gray-800">Game Instructions</h2>
67
+ <button onclick="backToMenu()" class="text-gray-500 hover:text-gray-700">
68
+ <i class="fas fa-times text-2xl"></i>
69
+ </button>
70
+ </div>
71
+
72
+ <div class="space-y-4 text-gray-700">
73
+ <div class="flex items-start">
74
+ <div class="bg-blue-100 p-2 rounded-full mr-3">
75
+ <i class="fas fa-user-md text-blue-600"></i>
76
+ </div>
77
+ <p>You play as an ER doctor at County General Hospital</p>
78
+ </div>
79
+
80
+ <div class="flex items-start">
81
+ <div class="bg-red-100 p-2 rounded-full mr-3">
82
+ <i class="fas fa-clock text-red-600"></i>
83
+ </div>
84
+ <p>Each case has a time limit - make decisions quickly!</p>
85
+ </div>
86
+
87
+ <div class="flex items-start">
88
+ <div class="bg-green-100 p-2 rounded-full mr-3">
89
+ <i class="fas fa-heartbeat text-green-600"></i>
90
+ </div>
91
+ <p>Examine patients, order tests, and choose treatments</p>
92
+ </div>
93
+
94
+ <div class="flex items-start">
95
+ <div class="bg-yellow-100 p-2 rounded-full mr-3">
96
+ <i class="fas fa-chart-line text-yellow-600"></i>
97
+ </div>
98
+ <p>Your score depends on patient outcomes and efficiency</p>
99
+ </div>
100
+
101
+ <div class="flex items-start">
102
+ <div class="bg-purple-100 p-2 rounded-full mr-3">
103
+ <i class="fas fa-procedures text-purple-600"></i>
104
+ </div>
105
+ <p>Different cases will challenge your medical knowledge</p>
106
+ </div>
107
+ </div>
108
+
109
+ <div class="mt-8">
110
+ <button onclick="backToMenu()" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-lg">
111
+ <i class="fas fa-arrow-left mr-2"></i> Back to Menu
112
+ </button>
113
+ </div>
114
+ </div>
115
+ </div>
116
+
117
+ <!-- Credits -->
118
+ <div id="credits" class="hidden flex-col items-center justify-center flex-grow p-4">
119
+ <div class="bg-white rounded-xl shadow-2xl p-8 max-w-2xl w-full">
120
+ <div class="flex justify-between items-center mb-6">
121
+ <h2 class="text-2xl font-bold text-gray-800">Credits</h2>
122
+ <button onclick="backToMenu()" class="text-gray-500 hover:text-gray-700">
123
+ <i class="fas fa-times text-2xl"></i>
124
+ </button>
125
+ </div>
126
+
127
+ <div class="space-y-6 text-gray-700">
128
+ <div>
129
+ <h3 class="font-bold text-lg text-blue-600 mb-2">Inspired by</h3>
130
+ <p>ER - The iconic medical drama television series</p>
131
+ </div>
132
+
133
+ <div>
134
+ <h3 class="font-bold text-lg text-green-600 mb-2">Created by</h3>
135
+ <p>Your friendly neighborhood web developer</p>
136
+ </div>
137
+
138
+ <div>
139
+ <h3 class="font-bold text-lg text-purple-600 mb-2">Special Thanks</h3>
140
+ <ul class="list-disc pl-5 space-y-1">
141
+ <li>Dr. Mark Greene</li>
142
+ <li>Dr. John Carter</li>
143
+ <li>Nurse Carol Hathaway</li>
144
+ <li>Dr. Peter Benton</li>
145
+ <li>All the ER staff at County General</li>
146
+ </ul>
147
+ </div>
148
+ </div>
149
+
150
+ <div class="mt-8">
151
+ <button onclick="backToMenu()" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-lg">
152
+ <i class="fas fa-arrow-left mr-2"></i> Back to Menu
153
+ </button>
154
+ </div>
155
+ </div>
156
+ </div>
157
+
158
+ <!-- Game Screen -->
159
+ <div id="game-screen" class="hidden flex-col flex-grow">
160
+ <!-- Header -->
161
+ <div class="bg-blue-800 text-white p-4 shadow-md">
162
+ <div class="container mx-auto flex justify-between items-center">
163
+ <div class="flex items-center space-x-2">
164
+ <i class="fas fa-hospital text-2xl"></i>
165
+ <h1 class="text-xl font-bold">COUNTY GENERAL HOSPITAL - EMERGENCY ROOM</h1>
166
+ </div>
167
+ <div class="flex items-center space-x-4">
168
+ <div class="bg-blue-700 px-3 py-1 rounded-lg">
169
+ <i class="fas fa-clock mr-1"></i>
170
+ <span id="time-remaining">05:00</span>
171
+ </div>
172
+ <div class="bg-blue-700 px-3 py-1 rounded-lg">
173
+ <i class="fas fa-heart mr-1"></i>
174
+ <span id="score">0</span> pts
175
+ </div>
176
+ </div>
177
+ </div>
178
+ </div>
179
+
180
+ <!-- Main Game Area -->
181
+ <div class="flex-grow container mx-auto p-4 flex flex-col">
182
+ <!-- Patient Info -->
183
+ <div id="patient-info" class="bg-white rounded-lg shadow-md p-6 mb-4 fade-in">
184
+ <div class="flex justify-between items-start mb-4">
185
+ <div>
186
+ <h2 class="text-2xl font-bold text-gray-800" id="patient-name">Loading patient...</h2>
187
+ <div class="flex space-x-4 mt-2">
188
+ <div class="flex items-center">
189
+ <i class="fas fa-venus-mars text-gray-500 mr-1"></i>
190
+ <span id="patient-gender">-</span>
191
+ </div>
192
+ <div class="flex items-center">
193
+ <i class="fas fa-birthday-cake text-gray-500 mr-1"></i>
194
+ <span id="patient-age">-</span>
195
+ </div>
196
+ <div class="flex items-center">
197
+ <i class="fas fa-thermometer-half text-gray-500 mr-1"></i>
198
+ <span id="patient-temp">-</span>
199
+ </div>
200
+ <div class="flex items-center">
201
+ <i class="fas fa-heartbeat text-gray-500 mr-1"></i>
202
+ <span id="patient-hr">-</span>
203
+ </div>
204
+ <div class="flex items-center">
205
+ <i class="fas fa-lungs text-gray-500 mr-1"></i>
206
+ <span id="patient-rr">-</span>
207
+ </div>
208
+ <div class="flex items-center">
209
+ <i class="fas fa-tint text-gray-500 mr-1"></i>
210
+ <span id="patient-bp">-</span>
211
+ </div>
212
+ </div>
213
+ </div>
214
+ <div class="bg-red-100 text-red-800 px-3 py-1 rounded-full text-sm font-semibold heartbeat" id="patient-status">
215
+ CRITICAL
216
+ </div>
217
+ </div>
218
+
219
+ <div class="border-t pt-4">
220
+ <h3 class="font-bold text-lg text-gray-700 mb-2">Chief Complaint</h3>
221
+ <p id="chief-complaint" class="text-gray-800">-</p>
222
+ </div>
223
+ </div>
224
+
225
+ <!-- Action Area -->
226
+ <div class="flex-grow grid grid-cols-1 md:grid-cols-3 gap-4">
227
+ <!-- Examination -->
228
+ <div class="bg-white rounded-lg shadow-md p-4">
229
+ <h3 class="font-bold text-lg text-blue-700 mb-3 border-b pb-2 flex items-center">
230
+ <i class="fas fa-stethoscope mr-2"></i> Examination
231
+ </h3>
232
+ <div class="space-y-2" id="exam-options">
233
+ <!-- Options will be added by JS -->
234
+ </div>
235
+ </div>
236
+
237
+ <!-- Tests -->
238
+ <div class="bg-white rounded-lg shadow-md p-4">
239
+ <h3 class="font-bold text-lg text-green-700 mb-3 border-b pb-2 flex items-center">
240
+ <i class="fas fa-vial mr-2"></i> Order Tests
241
+ </h3>
242
+ <div class="space-y-2" id="test-options">
243
+ <!-- Options will be added by JS -->
244
+ </div>
245
+ </div>
246
+
247
+ <!-- Treatment -->
248
+ <div class="bg-white rounded-lg shadow-md p-4">
249
+ <h3 class="font-bold text-lg text-red-700 mb-3 border-b pb-2 flex items-center">
250
+ <i class="fas fa-syringe mr-2"></i> Treatment
251
+ </h3>
252
+ <div class="space-y-2" id="treatment-options">
253
+ <!-- Options will be added by JS -->
254
+ </div>
255
+ </div>
256
+ </div>
257
+
258
+ <!-- Results/Feedback -->
259
+ <div id="feedback-area" class="mt-4 hidden">
260
+ <div class="bg-white rounded-lg shadow-md p-4 border-l-4 border-blue-500">
261
+ <h3 class="font-bold text-lg text-gray-800 mb-2">Results</h3>
262
+ <p id="feedback-text" class="text-gray-700">-</p>
263
+ <div class="mt-3">
264
+ <button onclick="nextCase()" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
265
+ <i class="fas fa-arrow-right mr-1"></i> Next Patient
266
+ </button>
267
+ </div>
268
+ </div>
269
+ </div>
270
+ </div>
271
+ </div>
272
+
273
+ <!-- Shift Summary -->
274
+ <div id="shift-summary" class="hidden flex-col items-center justify-center flex-grow p-4">
275
+ <div class="bg-white rounded-xl shadow-2xl p-8 max-w-2xl w-full">
276
+ <div class="text-center mb-6">
277
+ <i class="fas fa-clipboard-check text-5xl text-blue-500 mb-4"></i>
278
+ <h2 class="text-3xl font-bold text-gray-800">Shift Summary</h2>
279
+ <p class="text-gray-600">Your performance at County General ER</p>
280
+ </div>
281
+
282
+ <div class="space-y-6 mb-8">
283
+ <div class="flex justify-between items-center p-3 bg-gray-50 rounded-lg">
284
+ <div class="flex items-center">
285
+ <i class="fas fa-user-injured text-red-500 mr-3 text-xl"></i>
286
+ <span class="font-medium">Patients Treated</span>
287
+ </div>
288
+ <span class="font-bold text-lg" id="summary-patients">0</span>
289
+ </div>
290
+
291
+ <div class="flex justify-between items-center p-3 bg-gray-50 rounded-lg">
292
+ <div class="flex items-center">
293
+ <i class="fas fa-heart text-green-500 mr-3 text-xl"></i>
294
+ <span class="font-medium">Lives Saved</span>
295
+ </div>
296
+ <span class="font-bold text-lg" id="summary-saved">0</span>
297
+ </div>
298
+
299
+ <div class="flex justify-between items-center p-3 bg-gray-50 rounded-lg">
300
+ <div class="flex items-center">
301
+ <i class="fas fa-trophy text-yellow-500 mr-3 text-xl"></i>
302
+ <span class="font-medium">Total Score</span>
303
+ </div>
304
+ <span class="font-bold text-lg" id="summary-score">0</span>
305
+ </div>
306
+
307
+ <div class="flex justify-between items-center p-3 bg-gray-50 rounded-lg">
308
+ <div class="flex items-center">
309
+ <i class="fas fa-star text-blue-500 mr-3 text-xl"></i>
310
+ <span class="font-medium">Performance Rating</span>
311
+ </div>
312
+ <span class="font-bold text-lg" id="summary-rating">-</span>
313
+ </div>
314
+ </div>
315
+
316
+ <div class="flex flex-col space-y-3">
317
+ <button onclick="startGame()" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-lg">
318
+ <i class="fas fa-redo mr-2"></i> Another Shift
319
+ </button>
320
+ <button onclick="backToMenu()" class="w-full bg-gray-200 hover:bg-gray-300 text-gray-800 font-bold py-3 px-4 rounded-lg">
321
+ <i class="fas fa-home mr-2"></i> Main Menu
322
+ </button>
323
+ </div>
324
+ </div>
325
+ </div>
326
+ </div>
327
+
328
+ <script>
329
+ // Game State
330
+ const gameState = {
331
+ score: 0,
332
+ patientsTreated: 0,
333
+ livesSaved: 0,
334
+ currentCase: null,
335
+ timeLeft: 300, // 5 minutes in seconds
336
+ timer: null,
337
+ cases: [
338
+ {
339
+ name: "Michael Scott",
340
+ gender: "Male",
341
+ age: "42",
342
+ temp: "101.2°F",
343
+ hr: "112 bpm",
344
+ rr: "22/min",
345
+ bp: "150/90",
346
+ status: "Critical",
347
+ complaint: "Severe chest pain radiating to left arm, sweating profusely",
348
+ exams: [
349
+ { text: "Listen to heart sounds", correct: true, feedback: "You hear a faint murmur and irregular rhythm" },
350
+ { text: "Check pupil response", correct: false, feedback: "Pupils are normal but this doesn't help diagnose the chest pain" },
351
+ { text: "Palpate abdomen", correct: false, feedback: "Abdomen is soft and non-tender - not relevant here" }
352
+ ],
353
+ tests: [
354
+ { text: "ECG", correct: true, feedback: "ECG shows ST elevation in leads II, III, aVF - inferior MI" },
355
+ { text: "Complete blood count", correct: false, feedback: "CBC won't show acute cardiac ischemia" },
356
+ { text: "Troponin level", correct: true, feedback: "Troponin is elevated at 5.2 ng/mL (normal <0.04)" }
357
+ ],
358
+ treatments: [
359
+ { text: "Aspirin 325mg", correct: true, feedback: "Given - helps prevent further clotting" },
360
+ { text: "Nitroglycerin SL", correct: true, feedback: "BP stable after NTG - pain decreased slightly" },
361
+ { text: "Morphine 2mg IV", correct: true, feedback: "Pain better after morphine" },
362
+ { text: "Call cardiology for cath lab", correct: true, feedback: "Cardiology on the way - patient needs PCI ASAP" },
363
+ { text: "IV fluids bolus", correct: false, feedback: "Not indicated with elevated BP and pulmonary congestion" }
364
+ ],
365
+ diagnosis: "Acute Myocardial Infarction (Inferior STEMI)"
366
+ },
367
+ {
368
+ name: "Sarah Johnson",
369
+ gender: "Female",
370
+ age: "28",
371
+ temp: "98.6°F",
372
+ hr: "88 bpm",
373
+ rr: "18/min",
374
+ bp: "110/70",
375
+ status: "Stable",
376
+ complaint: "Sudden onset of severe headache described as 'worst headache of my life'",
377
+ exams: [
378
+ { text: "Neurological exam", correct: true, feedback: "Patient has neck stiffness and photophobia" },
379
+ { text: "Check for Kernig/Brudzinski signs", correct: true, feedback: "Positive Brudzinski sign present" },
380
+ { text: "Abdominal exam", correct: false, feedback: "Abdomen is benign - not relevant to headache" }
381
+ ],
382
+ tests: [
383
+ { text: "CT head without contrast", correct: true, feedback: "CT shows diffuse subarachnoid hemorrhage" },
384
+ { text: "Lumbar puncture", correct: true, feedback: "LP shows xanthochromia - confirms SAH" },
385
+ { text: "Chest X-ray", correct: false, feedback: "Chest is clear - not helpful for headache" }
386
+ ],
387
+ treatments: [
388
+ { text: "Pain medication", correct: false, feedback: "Need to find cause before treating pain" },
389
+ { text: "Nimodipine", correct: true, feedback: "Started to prevent vasospasm" },
390
+ { text: "Neurosurgery consult", correct: true, feedback: "Neurosurgeon evaluating for possible aneurysm" },
391
+ { text: "Blood pressure control", correct: true, feedback: "BP maintained at 120-140 systolic" }
392
+ ],
393
+ diagnosis: "Subarachnoid Hemorrhage (likely ruptured aneurysm)"
394
+ },
395
+ {
396
+ name: "David Miller",
397
+ gender: "Male",
398
+ age: "65",
399
+ temp: "102.3°F",
400
+ hr: "118 bpm",
401
+ rr: "28/min",
402
+ bp: "90/60",
403
+ status: "Critical",
404
+ complaint: "Fever, cough with green sputum, shortness of breath for 3 days",
405
+ exams: [
406
+ { text: "Auscultate lungs", correct: true, feedback: "Crackles heard in right lower lobe" },
407
+ { text: "Check for egophony", correct: true, feedback: "Positive egophony in RLL" },
408
+ { text: "Abdominal exam", correct: false, feedback: "Not relevant for respiratory symptoms" }
409
+ ],
410
+ tests: [
411
+ { text: "Chest X-ray", correct: true, feedback: "RLL infiltrate consistent with pneumonia" },
412
+ { text: "Blood cultures", correct: true, feedback: "Drawn before antibiotics" },
413
+ { text: "CBC with diff", correct: true, feedback: "WBC 18,000 with left shift" },
414
+ { text: "ECG", correct: false, feedback: "Normal sinus tachycardia - not helpful here" }
415
+ ],
416
+ treatments: [
417
+ { text: "Oxygen therapy", correct: true, feedback: "SpO2 improves to 94% on 2L NC" },
418
+ { text: "IV fluids", correct: true, feedback: "Given for hypotension" },
419
+ { text: "Antibiotics (Zosyn)", correct: true, feedback: "Broad spectrum coverage started" },
420
+ { text: "Antipyretics", correct: true, feedback: "Tylenol given for fever" },
421
+ { text: "Cough suppressant", correct: false, feedback: "Not indicated - cough helps clear secretions" }
422
+ ],
423
+ diagnosis: "Community-Acquired Pneumonia with Sepsis"
424
+ },
425
+ {
426
+ name: "Emily Chen",
427
+ gender: "Female",
428
+ age: "19",
429
+ temp: "97.8°F",
430
+ hr: "104 bpm",
431
+ rr: "16/min",
432
+ bp: "95/65",
433
+ status: "Stable",
434
+ complaint: "Generalized abdominal pain, nausea, vomiting for 12 hours. Pain now localized to RLQ",
435
+ exams: [
436
+ { text: "Palpate abdomen", correct: true, feedback: "Tenderness with guarding in RLQ" },
437
+ { text: "Check for rebound tenderness", correct: true, feedback: "Positive rebound present" },
438
+ { text: "Check for Rovsing's sign", correct: true, feedback: "Positive - pain in RLQ when LLQ pressed" },
439
+ { text: "Cardiac exam", correct: false, feedback: "Heart sounds normal - not relevant" }
440
+ ],
441
+ tests: [
442
+ { text: "CBC with diff", correct: true, feedback: "WBC 14,000 with neutrophilia" },
443
+ { text: "Urinalysis", correct: true, feedback: "Normal - rules out UTI" },
444
+ { text: "Pregnancy test", correct: true, feedback: "Negative" },
445
+ { text: "Abdominal CT", correct: true, feedback: "Appendiceal wall thickening with fat stranding" }
446
+ ],
447
+ treatments: [
448
+ { text: "IV fluids", correct: true, feedback: "Started for hydration" },
449
+ { text: "Pain medication", correct: false, feedback: "Need diagnosis first - may mask symptoms" },
450
+ { text: "Antibiotics", correct: true, feedback: "Cefoxitin started pre-op" },
451
+ { text: "Surgery consult", correct: true, feedback: "General surgeon agrees with appendicitis diagnosis" }
452
+ ],
453
+ diagnosis: "Acute Appendicitis"
454
+ },
455
+ {
456
+ name: "Robert Williams",
457
+ gender: "Male",
458
+ age: "54",
459
+ temp: "99.1°F",
460
+ hr: "92 bpm",
461
+ rr: "20/min",
462
+ bp: "210/110",
463
+ status: "Critical",
464
+ complaint: "Sudden onset of severe headache, blurred vision, and nausea",
465
+ exams: [
466
+ { text: "Neurological exam", correct: true, feedback: "Left-sided facial droop and arm weakness noted" },
467
+ { text: "Fundoscopic exam", correct: true, feedback: "Papilledema present" },
468
+ { text: "Check reflexes", correct: true, feedback: "Hyperreflexia on left side" },
469
+ { text: "Abdominal exam", correct: false, feedback: "Not relevant for neurological symptoms" }
470
+ ],
471
+ tests: [
472
+ { text: "CT head without contrast", correct: true, feedback: "Shows right basal ganglia hemorrhage" },
473
+ { text: "Basic metabolic panel", correct: true, feedback: "Na 148, K 4.0, Cr 1.1" },
474
+ { text: "Coagulation studies", correct: true, feedback: "PT/INR normal" },
475
+ { text: "Chest X-ray", correct: false, feedback: "Not immediately helpful for stroke workup" }
476
+ ],
477
+ treatments: [
478
+ { text: "Labetalol IV", correct: true, feedback: "BP decreasing gradually to 180/100" },
479
+ { text: "Mannitol", correct: true, feedback: "Given for intracranial pressure" },
480
+ { text: "Neurosurgery consult", correct: true, feedback: "Evaluating for possible intervention" },
481
+ { text: "Anticoagulants", correct: false, feedback: "Contraindicated in hemorrhagic stroke!" }
482
+ ],
483
+ diagnosis: "Hypertensive Intracerebral Hemorrhage"
484
+ }
485
+ ]
486
+ };
487
+
488
+ // DOM Elements
489
+ const mainMenu = document.getElementById('main-menu');
490
+ const instructions = document.getElementById('instructions');
491
+ const credits = document.getElementById('credits');
492
+ const gameScreen = document.getElementById('game-screen');
493
+ const shiftSummary = document.getElementById('shift-summary');
494
+
495
+ // Game Functions
496
+ function startGame() {
497
+ gameState.score = 0;
498
+ gameState.patientsTreated = 0;
499
+ gameState.livesSaved = 0;
500
+
501
+ mainMenu.classList.add('hidden');
502
+ gameScreen.classList.remove('hidden');
503
+ document.getElementById('feedback-area').classList.add('hidden');
504
+
505
+ loadNextCase();
506
+ }
507
+
508
+ function loadNextCase() {
509
+ // Reset timer
510
+ clearInterval(gameState.timer);
511
+ gameState.timeLeft = 300;
512
+ updateTimerDisplay();
513
+ gameState.timer = setInterval(updateTimer, 1000);
514
+
515
+ // Select a random case
516
+ const randomIndex = Math.floor(Math.random() * gameState.cases.length);
517
+ gameState.currentCase = gameState.cases[randomIndex];
518
+
519
+ // Update patient info
520
+ document.getElementById('patient-name').textContent = gameState.currentCase.name;
521
+ document.getElementById('patient-gender').textContent = gameState.currentCase.gender;
522
+ document.getElementById('patient-age').textContent = gameState.currentCase.age;
523
+ document.getElementById('patient-temp').textContent = gameState.currentCase.temp;
524
+ document.getElementById('patient-hr').textContent = gameState.currentCase.hr;
525
+ document.getElementById('patient-rr').textContent = gameState.currentCase.rr;
526
+ document.getElementById('patient-bp').textContent = gameState.currentCase.bp;
527
+ document.getElementById('patient-status').textContent = gameState.currentCase.status;
528
+ document.getElementById('chief-complaint').textContent = gameState.currentCase.complaint;
529
+
530
+ // Update score display
531
+ document.getElementById('score').textContent = gameState.score;
532
+
533
+ // Clear previous options
534
+ document.getElementById('exam-options').innerHTML = '';
535
+ document.getElementById('test-options').innerHTML = '';
536
+ document.getElementById('treatment-options').innerHTML = '';
537
+
538
+ // Add exam options
539
+ gameState.currentCase.exams.forEach(exam => {
540
+ const button = document.createElement('button');
541
+ button.className = 'w-full text-left bg-blue-50 hover:bg-blue-100 text-blue-800 font-medium py-2 px-3 rounded transition';
542
+ button.innerHTML = `<i class="fas fa-search mr-2"></i> ${exam.text}`;
543
+ button.onclick = () => selectOption('exam', exam);
544
+ document.getElementById('exam-options').appendChild(button);
545
+ });
546
+
547
+ // Add test options
548
+ gameState.currentCase.tests.forEach(test => {
549
+ const button = document.createElement('button');
550
+ button.className = 'w-full text-left bg-green-50 hover:bg-green-100 text-green-800 font-medium py-2 px-3 rounded transition';
551
+ button.innerHTML = `<i class="fas fa-flask mr-2"></i> ${test.text}`;
552
+ button.onclick = () => selectOption('test', test);
553
+ document.getElementById('test-options').appendChild(button);
554
+ });
555
+
556
+ // Add treatment options
557
+ gameState.currentCase.treatments.forEach(treatment => {
558
+ const button = document.createElement('button');
559
+ button.className = 'w-full text-left bg-red-50 hover:bg-red-100 text-red-800 font-medium py-2 px-3 rounded transition';
560
+ button.innerHTML = `<i class="fas fa-medkit mr-2"></i> ${treatment.text}`;
561
+ button.onclick = () => selectOption('treatment', treatment);
562
+ document.getElementById('treatment-options').appendChild(button);
563
+ });
564
+ }
565
+
566
+ function selectOption(type, option) {
567
+ // Add visual feedback
568
+ const buttons = document.querySelectorAll(`#${type}-options button`);
569
+ buttons.forEach(btn => {
570
+ btn.disabled = true;
571
+ if (btn.textContent.includes(option.text)) {
572
+ btn.classList.remove(
573
+ type === 'exam' ? 'bg-blue-50 hover:bg-blue-100 text-blue-800' :
574
+ type === 'test' ? 'bg-green-50 hover:bg-green-100 text-green-800' :
575
+ 'bg-red-50 hover:bg-red-100 text-red-800'
576
+ );
577
+ btn.classList.add(option.correct ? 'bg-green-100 text-green-800 border border-green-300' : 'bg-red-100 text-red-800 border border-red-300');
578
+ }
579
+ });
580
+
581
+ // Update score
582
+ if (option.correct) {
583
+ gameState.score += 10;
584
+ document.getElementById('score').textContent = gameState.score;
585
+
586
+ // Add positive feedback animation
587
+ const scoreElement = document.getElementById('score');
588
+ scoreElement.classList.add('heartbeat');
589
+ setTimeout(() => scoreElement.classList.remove('heartbeat'), 1000);
590
+ } else {
591
+ gameState.score = Math.max(0, gameState.score - 5);
592
+ document.getElementById('score').textContent = gameState.score;
593
+ }
594
+
595
+ // Check if all critical options were selected
596
+ setTimeout(checkCaseCompletion, 500);
597
+ }
598
+
599
+ function checkCaseCompletion() {
600
+ // In a real game, you'd have more complex logic to determine case completion
601
+ // For this demo, we'll just move to the next case after a few selections
602
+
603
+ const selectedCount = document.querySelectorAll('#exam-options button, #test-options button, #treatment-options button')
604
+ .filter(btn => btn.disabled).length;
605
+
606
+ const totalCriticalOptions = [
607
+ ...gameState.currentCase.exams.filter(e => e.correct),
608
+ ...gameState.currentCase.tests.filter(t => t.correct),
609
+ ...gameState.currentCase.treatments.filter(t => t.correct)
610
+ ].length;
611
+
612
+ if (selectedCount >= Math.min(5, totalCriticalOptions + 2)) {
613
+ completeCase();
614
+ }
615
+ }
616
+
617
+ function completeCase() {
618
+ clearInterval(gameState.timer);
619
+
620
+ // Calculate time bonus
621
+ const timeBonus = Math.floor(gameState.timeLeft / 10);
622
+ gameState.score += timeBonus;
623
+
624
+ // Update stats
625
+ gameState.patientsTreated++;
626
+ gameState.livesSaved++; // In a real game, this would depend on performance
627
+
628
+ // Show feedback
629
+ document.getElementById('feedback-area').classList.remove('hidden');
630
+ document.getElementById('feedback-text').innerHTML = `
631
+ <p class="mb-2"><strong>Diagnosis:</strong> ${gameState.currentCase.diagnosis}</p>
632
+ <p class="mb-2"><strong>Time Bonus:</strong> +${timeBonus} points</p>
633
+ <p>Patient stabilized and transferred to appropriate care.</p>
634
+ `;
635
+
636
+ // Update score display
637
+ document.getElementById('score').textContent = gameState.score;
638
+ }
639
+
640
+ function nextCase() {
641
+ if (gameState.patientsTreated >= 3) { // End after 3 cases for this demo
642
+ endShift();
643
+ } else {
644
+ loadNextCase();
645
+ document.getElementById('feedback-area').classList.add('hidden');
646
+ }
647
+ }
648
+
649
+ function endShift() {
650
+ clearInterval(gameState.timer);
651
+ gameScreen.classList.add('hidden');
652
+ shiftSummary.classList.remove('hidden');
653
+
654
+ // Update summary
655
+ document.getElementById('summary-patients').textContent = gameState.patientsTreated;
656
+ document.getElementById('summary-saved').textContent = gameState.livesSaved;
657
+ document.getElementById('summary-score').textContent = gameState.score;
658
+
659
+ // Performance rating
660
+ let rating = "";
661
+ if (gameState.score >= 250) {
662
+ rating = "Attending Level!";
663
+ } else if (gameState.score >= 150) {
664
+ rating = "Senior Resident";
665
+ } else if (gameState.score >= 100) {
666
+ rating = "Junior Resident";
667
+ } else {
668
+ rating = "Intern - Keep Practicing!";
669
+ }
670
+ document.getElementById('summary-rating').textContent = rating;
671
+ }
672
+
673
+ function updateTimer() {
674
+ gameState.timeLeft--;
675
+ updateTimerDisplay();
676
+
677
+ if (gameState.timeLeft <= 0) {
678
+ clearInterval(gameState.timer);
679
+ // Time's up - negative consequences
680
+ gameState.score = Math.max(0, gameState.score - 20);
681
+ document.getElementById('feedback-area').classList.remove('hidden');
682
+ document.getElementById('feedback-text').innerHTML = `
683
+ <p class="text-red-600 font-bold mb-2">Time's up!</p>
684
+ <p class="mb-2">You took too long to treat this patient.</p>
685
+ <p><strong>Score Penalty:</strong> -20 points</p>
686
+ `;
687
+ }
688
+ }
689
+
690
+ function updateTimerDisplay() {
691
+ const minutes = Math.floor(gameState.timeLeft / 60);
692
+ const seconds = gameState.timeLeft % 60;
693
+ document.getElementById('time-remaining').textContent =
694
+ `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
695
+
696
+ // Change color when time is low
697
+ const timerElement = document.getElementById('time-remaining');
698
+ if (gameState.timeLeft <= 60) {
699
+ timerElement.classList.remove('text-white');
700
+ timerElement.classList.add('text-red-400', 'font-bold');
701
+ } else {
702
+ timerElement.classList.add('text-white');
703
+ timerElement.classList.remove('text-red-400', 'font-bold');
704
+ }
705
+ }
706
+
707
+ // Menu Navigation
708
+ function showInstructions() {
709
+ mainMenu.classList.add('hidden');
710
+ instructions.classList.remove('hidden');
711
+ }
712
+
713
+ function showCredits() {
714
+ mainMenu.classList.add('hidden');
715
+ credits.classList.remove('hidden');
716
+ }
717
+
718
+ function backToMenu() {
719
+ instructions.classList.add('hidden');
720
+ credits.classList.add('hidden');
721
+ gameScreen.classList.add('hidden');
722
+ shiftSummary.classList.add('hidden');
723
+ mainMenu.classList.remove('hidden');
724
+ }
725
+
726
+ // Initialize
727
+ document.addEventListener('DOMContentLoaded', () => {
728
+ // Add any initialization code if needed
729
+ });
730
+ </script>
731
+ <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=KatEdwards/assorted-games" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
732
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ please make me a game based on the TV Show ER