Widget:520Jeopardy: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
==Usage== | ==Usage== | ||
<nowiki>{{#widget:520Jeapordy}}</nowiki> | <nowiki>{{#widget:520Jeapordy}}</nowiki> | ||
</noinclude><includeonly><div id="jep520"> | |||
</noinclude><includeonly><div id=" | |||
<style> | <style> | ||
. | #jep520 .jepgame { font-family: Arial, sans-serif; background: linear-gradient(135deg, rgb(30,58,95) 0%, rgb(12,25,41) 100%); padding: 20px; border-radius: 8px; max-width: 1200px; margin: 0 auto; } | ||
#jep520 .jepgame * { margin: 0; padding: 0; box-sizing: border-box; } | |||
#jep520 .jeptitle { text-align: center; color: rgb(251,191,36); font-size: 2rem; font-weight: bold; margin-bottom: 8px; } | |||
. | #jep520 .jepsub { text-align: center; color: rgb(147,197,253); margin-bottom: 15px; font-size: 0.9rem; } | ||
. | #jep520 .jepscores { display: flex; justify-content: center; gap: 30px; margin-bottom: 15px; } | ||
. | #jep520 .jepteam { background: rgb(30,64,175); padding: 10px 20px; border-radius: 8px; text-align: center; } | ||
. | #jep520 .jepteam.on { box-shadow: 0 0 15px rgb(251,191,36); } | ||
. | #jep520 .jepteam h3 { color: white; margin-bottom: 5px; font-size: 0.95rem; } | ||
. | #jep520 .jepscore { font-size: 1.4rem; font-weight: bold; } | ||
. | #jep520 .jeppos { color: rgb(74,222,128); } | ||
. | #jep520 .jepneg { color: rgb(248,113,113); } | ||
. | #jep520 .jepturn { text-align: center; color: rgb(251,191,36); font-size: 1rem; margin-bottom: 12px; } | ||
. | #jep520 .jepboard { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-bottom: 15px; } | ||
. | #jep520 .jepcat { background: rgb(30,64,175); color: white; padding: 10px 5px; text-align: center; font-weight: bold; font-size: 0.8rem; border-radius: 5px 5px 0 0; min-height: 50px; display: flex; align-items: center; justify-content: center; } | ||
. | #jep520 .jepcell { background: rgb(37,99,235); color: rgb(251,191,36); padding: 15px 5px; text-align: center; font-size: 1.2rem; font-weight: bold; border-radius: 5px; cursor: pointer; border: none; width: 100%; } | ||
. | #jep520 .jepcell:hover { background: rgb(59,130,246); } | ||
. | #jep520 .jepcell.done { background: rgb(30,58,95); color: rgb(30,58,95); cursor: default; } | ||
. | #jep520 .jepreset { background: rgb(220,38,38); color: white; padding: 8px 16px; border-radius: 5px; font-weight: bold; cursor: pointer; border: none; } | ||
. | #jep520 .jepreset:hover { background: rgb(185,28,28); } | ||
. | #jep520 .jepmute { background: rgb(30,64,175); color: white; padding: 8px 12px; border-radius: 5px; border: none; cursor: pointer; font-size: 1.1rem; margin-left: 10px; } | ||
. | #jep520 .jeptips { text-align: center; color: rgb(147,197,253); font-size: 0.75rem; margin-top: 10px; } | ||
. | #jep520 .jepqview { background: rgb(30,64,175); border-radius: 8px; padding: 20px; color: white; max-width: 700px; margin: 0 auto; } | ||
. | #jep520 .jepqhead { text-align: center; margin-bottom: 15px; } | ||
. | #jep520 .jepqcat { display: inline-block; background: rgb(251,191,36); color: rgb(30,58,95); padding: 5px 15px; border-radius: 15px; font-weight: bold; font-size: 0.9rem; } | ||
. | #jep520 .jepqteam { color: rgb(251,191,36); margin-top: 8px; } | ||
. | #jep520 .jepqtimer { text-align: center; margin-bottom: 12px; } | ||
. | #jep520 .jeptbadge { display: inline-block; padding: 6px 16px; border-radius: 15px; font-size: 1.2rem; font-weight: bold; background: rgb(251,191,36); color: rgb(30,58,95); } | ||
. | #jep520 .jeptbadge.warn { background: rgb(220,38,38); color: white; } | ||
. | #jep520 .jepscenario { background: rgb(29,78,216); border-radius: 6px; padding: 12px; margin-bottom: 10px; } | ||
. | #jep520 .jepscenario h4 { color: rgb(251,191,36); margin-bottom: 6px; font-size: 0.9rem; } | ||
. | #jep520 .jepscenario p { font-size: 0.95rem; line-height: 1.4; } | ||
. | #jep520 .jepquest { background: rgb(37,99,235); border-radius: 6px; padding: 12px; margin-bottom: 10px; } | ||
. | #jep520 .jepquest h4 { color: rgb(251,191,36); margin-bottom: 6px; font-size: 0.9rem; } | ||
. | #jep520 .jepquest p { font-size: 1rem; font-weight: 600; } | ||
. | #jep520 .jepans { background: rgb(22,101,52); border-radius: 6px; padding: 12px; margin-bottom: 10px; } | ||
. | #jep520 .jepans h4 { color: rgb(251,191,36); margin-bottom: 6px; font-size: 0.9rem; } | ||
. | #jep520 .jepans p { font-size: 0.95rem; line-height: 1.4; } | ||
. | #jep520 .jepbtns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 15px; } | ||
. | #jep520 .jepbtn { padding: 10px 20px; border-radius: 5px; font-weight: bold; cursor: pointer; border: none; font-size: 0.9rem; } | ||
. | #jep520 .jepreveal { background: rgb(251,191,36); color: rgb(30,58,95); } | ||
. | #jep520 .jepreveal:hover { background: rgb(252,211,77); } | ||
. | #jep520 .jepcorrect { background: rgb(34,197,94); color: white; } | ||
. | #jep520 .jepcorrect:hover { background: rgb(22,163,74); } | ||
. | #jep520 .jepwrong { background: rgb(239,68,68); color: white; } | ||
. | #jep520 .jepwrong:hover { background: rgb(220,38,38); } | ||
. | #jep520 .jepover { text-align: center; padding: 30px; } | ||
. | #jep520 .jepover h1 { font-size: 2rem; color: rgb(251,191,36); margin-bottom: 15px; } | ||
. | #jep520 .jepfinal { font-size: 1.2rem; color: white; margin-bottom: 10px; } | ||
. | #jep520 .jepwinner { font-size: 1.5rem; color: rgb(251,191,36); font-weight: bold; margin-bottom: 20px; } | ||
. | |||
</style> | </style> | ||
<div class=" | <div class="jepgame" id="jep520game"></div> | ||
</div> | |||
<script> | <script> | ||
(function() { | |||
var | var cats = [ | ||
{name:"Cardiovascular", | {name:"Cardiovascular",q:[ | ||
{pts:200, | {pts:200,s:"A 58-year-old patient with heart failure is prescribed digoxin. Before administering the medication, the nurse checks the apical pulse and finds it to be 52 bpm.",q:"What should the nurse do?",a:"Hold the medication and notify the healthcare provider. Digoxin should be held if the apical pulse is below 60 bpm in adults due to risk of toxicity and bradycardia."}, | ||
{pts:400, | {pts:400,s:"A patient taking warfarin for atrial fibrillation has an INR of 4.8. The patient reports dark, tarry stools and dizziness.",q:"What is the priority nursing intervention?",a:"Hold warfarin, notify the provider immediately, and prepare for possible administration of Vitamin K. The patient shows signs of GI bleeding with supratherapeutic INR levels."}, | ||
{pts:600, | {pts:600,s:"A post-MI patient on a cardiac monitor suddenly shows a wide QRS complex rhythm at 180 bpm with no detectable pulse.",q:"What is this rhythm and what is the immediate action?",a:"Ventricular tachycardia (pulseless VT). Begin CPR immediately and prepare for defibrillation. This is a shockable rhythm requiring immediate intervention per ACLS protocol."}, | ||
{pts:800, | {pts:800,s:"A patient with chronic heart failure is started on carvedilol. Two weeks later, the patient reports increased shortness of breath and weight gain of 5 lbs.",q:"Why might this occur and what should the nurse assess?",a:"Beta-blockers can initially worsen heart failure symptoms before providing long-term benefit. Assess for fluid retention, monitor daily weights, lung sounds, and edema."}, | ||
{pts:1000, | {pts:1000,s:"A hypertensive patient on lisinopril develops a persistent dry cough. The provider switches to losartan.",q:"What is the nurse's best explanation for this change?",a:"ACE inhibitors like lisinopril can cause dry cough due to bradykinin accumulation. ARBs like losartan work similarly but don't cause bradykinin buildup, so cough is not a side effect."} | ||
]}, | ]}, | ||
{name:"Pain Mgmt", | {name:"Pain Mgmt",q:[ | ||
{pts:200, | {pts:200,s:"A post-surgical patient rates their pain as 7/10 and requests PRN morphine. The last dose was given 3 hours ago, ordered every 4 hours.",q:"What is the appropriate nursing action?",a:"Offer non-pharmacological interventions (repositioning, ice/heat, relaxation) and reassess in 1 hour. Cannot give morphine until 4-hour interval has passed."}, | ||
{pts:400, | {pts:400,s:"An elderly patient with dementia is grimacing, guarding their abdomen, and has increased restlessness but cannot verbally report pain.",q:"What pain assessment tool should the nurse use?",a:"Use a behavioral pain scale such as PAINAD (Pain Assessment in Advanced Dementia) or FLACC scale. Assess for nonverbal cues."}, | ||
{pts:600, | {pts:600,s:"A patient with chronic back pain has been on oxycodone for 6 months and now requires higher doses to achieve the same pain relief.",q:"What phenomenon is this, and how is it different from addiction?",a:"This is tolerance - a physiological adaptation requiring higher doses. It differs from addiction, which involves compulsive use despite harm and loss of control."}, | ||
{pts:800, | {pts:800,s:"A patient receiving IV morphine via PCA pump has a respiratory rate of 8, is difficult to arouse, and has pinpoint pupils.",q:"What is occurring and what are the priority interventions?",a:"Opioid overdose/toxicity. Stop PCA, stimulate patient, call for help, prepare naloxone (Narcan), support airway and breathing."}, | ||
{pts:1000, | {pts:1000,s:"A patient with cancer pain is on around-the-clock MS Contin but still has breakthrough pain episodes.",q:"What medication regimen modification should the nurse anticipate?",a:"Add immediate-release morphine for breakthrough pain, typically 10-15 percent of the total 24-hour dose."} | ||
]}, | ]}, | ||
{name:"Teaching", | {name:"Teaching",q:[ | ||
{pts:200, | {pts:200,s:"A newly diagnosed diabetic patient needs insulin teaching. The patient appears anxious and keeps checking their phone.",q:"What should the nurse do before beginning education?",a:"Assess readiness to learn. Address anxiety first, minimize distractions, and determine the patient's learning style and priorities."}, | ||
{pts:400, | {pts:400,s:"An elderly patient with newly prescribed warfarin has mild hearing loss and reads at a 6th-grade level.",q:"What teaching strategies should the nurse employ?",a:"Face the patient when speaking, use simple language, provide written materials at appropriate reading level with large print, use teach-back method."}, | ||
{pts:600, | {pts:600,s:"A patient is being discharged on metformin for type 2 diabetes. They ask if they can drink alcohol on weekends.",q:"What patient education should the nurse provide?",a:"Alcohol increases risk of lactic acidosis with metformin and can cause hypoglycemia. Recommend limiting alcohol and never drinking on empty stomach."}, | ||
{pts:800, | {pts:800,s:"A patient with CHF is being discharged. The nurse has 15 minutes to provide discharge teaching about medications, diet, activity, and warning signs.",q:"How should the nurse prioritize this teaching?",a:"Focus on survival skills: daily weights (report 2+ lb gain), sodium restriction basics, medication names/times, and warning signs requiring immediate attention."}, | ||
{pts:1000, | {pts:1000,s:"A 16-year-old with newly diagnosed epilepsy needs teaching about phenytoin. The mother wants to handle all medication administration.",q:"What developmental considerations should guide the nurse's approach?",a:"Adolescents need autonomy. Include the teen in teaching, address concerns about appearance (gingival hyperplasia) and driving restrictions."} | ||
]}, | ]}, | ||
{name:"GI/Hepatic", | {name:"GI/Hepatic",q:[ | ||
{pts:200, | {pts:200,s:"A patient with cirrhosis has a serum ammonia level of 95 mcg/dL (normal: 15-45). The patient is confused and has asterixis.",q:"What medication should the nurse anticipate and why?",a:"Lactulose - it acidifies the colon, converting ammonia to ammonium which cannot be absorbed, and promotes bowel movements to eliminate ammonia."}, | ||
{pts:400, | {pts:400,s:"A patient post-cholecystectomy complains of severe right shoulder pain despite the surgery being abdominal.",q:"What causes this and what should the nurse do?",a:"Referred pain from CO2 used during laparoscopic surgery irritating the diaphragm. Encourage ambulation to absorb the gas."}, | ||
{pts:600, | {pts:600,s:"A patient with peptic ulcer disease is prescribed omeprazole, clarithromycin, and amoxicillin for 14 days.",q:"What is this regimen treating and what teaching is essential?",a:"H. pylori eradication (triple therapy). Complete entire course even if feeling better, take PPI before meals, return for follow-up testing."}, | ||
{pts:800, | {pts:800,s:"A patient with acute pancreatitis has NG tube to suction, IV fluids, and NPO status. The patient asks why they can't eat.",q:"What is the nurse's best explanation?",a:"The pancreas needs rest to heal. Eating stimulates pancreatic enzyme secretion, which can worsen inflammation and pain."}, | ||
{pts:1000, | {pts:1000,s:"A patient with Crohn's disease on long-term prednisone develops round face, central obesity, and blood glucose of 180 mg/dL.",q:"What is occurring and what patient education is needed?",a:"Cushing syndrome from chronic corticosteroid use. Never stop medication abruptly, report signs of infection, monitor blood glucose."} | ||
]}, | ]}, | ||
{name:"Med Admin", | {name:"Med Admin",q:[ | ||
{pts:200, | {pts:200,s:"A nurse is preparing to administer IV vancomycin. The pharmacy sends it to infuse over 30 minutes.",q:"What concern should the nurse have?",a:"Vancomycin infused too rapidly causes Red Man Syndrome - flushing, hypotension, rash. Should infuse over at least 60 minutes."}, | ||
{pts:400, | {pts:400,s:"A patient's MAR shows potassium chloride 40 mEq IV ordered. The nurse receives the medication as a 40 mEq vial.",q:"What must the nurse verify before administration?",a:"IV potassium must NEVER be given as bolus push - causes fatal arrhythmias. Verify diluted appropriately, infused via pump, max 10-20 mEq/hour."}, | ||
{pts:600, | {pts:600,s:"A nurse is to administer insulin lispro (Humalog) and insulin glargine (Lantus) to a diabetic patient before breakfast.",q:"How should these insulins be administered?",a:"Give in SEPARATE syringes - Lantus should never be mixed with other insulins as it can alter the action of both."}, | ||
{pts:800, | {pts:800,s:"A patient on IV heparin drip has an aPTT of 120 seconds (therapeutic range 60-80). The patient now needs an invasive procedure.",q:"What should the nurse do?",a:"Hold heparin infusion, notify provider. If urgent reversal needed, protamine sulfate is the antidote. Monitor for bleeding."}, | ||
{pts:1000, | {pts:1000,s:"A patient receiving first dose of IV penicillin develops hives, wheezing, and BP drop to 80/50 after 5 minutes.",q:"What is occurring and list interventions in priority order?",a:"Anaphylaxis. 1) Stop infusion, 2) Call for help, 3) Epinephrine IM, 4) Maintain airway, 5) IV fluids, 6) Diphenhydramine/corticosteroids."} | ||
]}, | ]}, | ||
{name:"Pathophys", | {name:"Pathophys",q:[ | ||
{pts:200, | {pts:200,s:"A patient with uncontrolled diabetes has blood glucose of 450 mg/dL, breathing rapidly and deeply, and fruity-smelling breath.",q:"What condition is this and what causes these symptoms?",a:"Diabetic Ketoacidosis (DKA). Lack of insulin causes fat breakdown producing ketones. Metabolic acidosis triggers Kussmaul respirations."}, | ||
{pts:400, | {pts:400,s:"A patient with COPD on 2L nasal cannula has oxygen increased to 6L by family. The patient becomes increasingly drowsy.",q:"What is happening physiologically?",a:"CO2 narcosis. COPD patients rely on hypoxic drive. High-flow oxygen removes this drive, causing hypoventilation and CO2 retention."}, | ||
{pts:600, | {pts:600,s:"A patient after thyroidectomy develops tingling around the mouth, muscle cramps, and positive Chvostek's sign.",q:"What complication is this and why does it occur?",a:"Hypocalcemia due to damage to parathyroid glands during surgery. Treat with IV calcium gluconate."}, | ||
{pts:800, | {pts:800,s:"A trauma patient receives 6 units of PRBCs. Labs show: pH 7.28, K+ 6.2 mEq/L, calcium 7.8 mg/dL, hypothermia.",q:"What complications of massive transfusion are occurring?",a:"Metabolic acidosis, hyperkalemia (K+ leaks from stored RBCs), hypocalcemia (citrate binds calcium), and hypothermia."}, | ||
{pts:1000, | {pts:1000,s:"A patient with severe sepsis has: BP 78/40, HR 128, lactate 6 mmol/L, urine output 10 mL/hr for 2 hours.",q:"What is occurring and what are the priority interventions?",a:"Septic shock. Fluid resuscitation (30 mL/kg), obtain cultures, broad-spectrum antibiotics within 1 hour, vasopressors if needed."} | ||
]} | ]} | ||
]; | ]; | ||
var | var st = {sc1:0, sc2:0, tm:1, done:{}, cur:null, tmr:30, ti:null, mute:false, actx:null}; | ||
var game = document.getElementById('jep520game'); | |||
function | function tone(f,d,t,v) { | ||
if(st.mute||!st.actx)return; | |||
var o=st.actx.createOscillator(),g=st.actx.createGain(); | |||
o.connect(g);g.connect(st.actx.destination); | |||
o.frequency.value=f;o.type=t||'sine';g.gain.value=v||0.3; | |||
g.gain.exponentialRampToValueAtTime(0.01,st.actx.currentTime+d); | |||
o.start();o.stop(st.actx.currentTime+d); | |||
} | } | ||
function | function sndSelect() { | ||
if(!st.actx)st.actx=new(window.AudioContext||window.webkitAudioContext)(); | |||
if(st.actx.state==='suspended')st.actx.resume(); | |||
tone(523,0.1,'sine',0.2); | |||
setTimeout(function(){tone(659,0.1,'sine',0.2);},50); | |||
setTimeout(function(){tone(784,0.15,'sine',0.2);},100); | |||
} | } | ||
function | function sndCorrect() { | ||
[523,659,784,1047].forEach(function(f,i){setTimeout(function(){tone(f,0.2,'sine',0.25);},i*100);}); | |||
} | } | ||
function | function sndWrong() { | ||
tone(200,0.3,'sawtooth',0.15); | |||
setTimeout(function(){tone(150,0.4,'sawtooth',0.15);},150); | |||
setTimeout(function() { | |||
} | } | ||
function | function sndReveal() { | ||
tone(440,0.1,'triangle',0.2); | |||
setTimeout(function(){tone(554,0.1,'triangle',0.2);},100); | |||
setTimeout(function(){tone(659,0.2,'triangle',0.2);},200); | |||
} | } | ||
function | function renderBoard() { | ||
var | var h = '<h1 class="jeptitle">🏥 Nursing Pharmacology Jeopardy</h1>'; | ||
h += '<p class="jepsub">NSG 520 - Pathophysiology and Pharmacology</p>'; | |||
for (var c = 0; c < | h += '<div class="jepscores">'; | ||
h += '<div class="jepteam'+(st.tm===1?' on':'')+'"><h3>Team 1</h3><div class="jepscore '+(st.sc1>=0?'jeppos':'jepneg')+'">$'+st.sc1+'</div></div>'; | |||
h += '<div class="jepteam'+(st.tm===2?' on':'')+'"><h3>Team 2</h3><div class="jepscore '+(st.sc2>=0?'jeppos':'jepneg')+'">$'+st.sc2+'</div></div>'; | |||
h += '</div>'; | |||
h += '<p class="jepturn">🎯 Team '+st.tm+'\'s Turn to Pick</p>'; | |||
h += '<div class="jepboard">'; | |||
for(var c=0;c<cats.length;c++){ | |||
h += '<div class="jepcat">'+cats[c].name+'</div>'; | |||
} | } | ||
for (var | for(var r=0;r<5;r++){ | ||
for (var c = 0; c < | for(var c=0;c<cats.length;c++){ | ||
var | var k=c+'-'+r; | ||
if(st.done[k]){ | |||
h += '<button class="jepcell done"></button>'; | |||
}else{ | |||
h += '<button class="jepcell" onclick="jep520click('+c+','+r+')">$'+cats[c].q[r].pts+'</button>'; | |||
} | } | ||
} | } | ||
} | } | ||
h += '</div>'; | |||
h += '<div style="text-align:center;">'; | |||
h += '<button class="jepreset" onclick="jep520reset()">Reset Game</button>'; | |||
h += '<button class="jepmute" onclick="jep520mute()">'+(st.mute?'🔇':'🔊')+'</button>'; | |||
h += '</div>'; | |||
h += '<p class="jeptips">💡 Questions increase in difficulty with point value | 🎵 Sound effects included</p>'; | |||
game.innerHTML = h; | |||
} | } | ||
function | function renderQuestion() { | ||
var | var c = cats[st.cur.c]; | ||
var q = c.q[st.cur.r]; | |||
var h = '<div class="jepqview">'; | |||
h += '<div class="jepqhead">'; | |||
h += '<span class="jepqcat">'+c.name+' - $'+q.pts+'</span>'; | |||
h += '<p class="jepqteam">Team '+st.tm+'\'s Turn</p>'; | |||
h += '</div>'; | |||
h += '<div class="jepqtimer"><span class="jeptbadge'+(st.tmr<=10?' warn':'')+'">⏱️ '+st.tmr+'s</span></div>'; | |||
h += '<div class="jepscenario"><h4>📋 Scenario:</h4><p>'+q.s+'</p></div>'; | |||
h += '<div class="jepquest"><h4>❓ Question:</h4><p>'+q.q+'</p></div>'; | |||
h += '<div class="jepbtns"><button class="jepbtn jepreveal" onclick="jep520reveal()">Reveal Answer</button></div>'; | |||
h += '</div>'; | |||
game.innerHTML = h; | |||
} | |||
function renderAnswer() { | |||
var c = cats[st.cur.c]; | |||
var q = c.q[st.cur.r]; | |||
var h = '<div class="jepqview">'; | |||
h += '<div class="jepqhead">'; | |||
h += '<span class="jepqcat">'+c.name+' - $'+q.pts+'</span>'; | |||
h += '<p class="jepqteam">Team '+st.tm+'\'s Turn</p>'; | |||
h += '</div>'; | |||
h += '<div class="jepscenario"><h4>📋 Scenario:</h4><p>'+q.s+'</p></div>'; | |||
h += '<div class="jepquest"><h4>❓ Question:</h4><p>'+q.q+'</p></div>'; | |||
h += '<div class="jepans"><h4>✅ Answer:</h4><p>'+q.a+'</p></div>'; | |||
h += '<div class="jepbtns">'; | |||
h += '<button class="jepbtn jepcorrect" onclick="jep520ans(true)">✓ Correct (+$'+q.pts+')</button>'; | |||
h += '<button class="jepbtn jepwrong" onclick="jep520ans(false)">✗ Incorrect (-$'+q.pts+')</button>'; | |||
h += '</div>'; | |||
h += '</div>'; | |||
game.innerHTML = h; | |||
} | |||
function renderGameOver() { | |||
var w = st.sc1>st.sc2 ? 'Team 1 Wins!' : (st.sc2>st.sc1 ? 'Team 2 Wins!' : "It's a Tie!"); | |||
var h = '<div class="jepqview jepover">'; | |||
h += '<h1>🏆 Game Over!</h1>'; | |||
h += '<p class="jepfinal">Team 1: $'+st.sc1+'</p>'; | |||
h += '<p class="jepfinal">Team 2: $'+st.sc2+'</p>'; | |||
h += '<p class="jepwinner">'+w+'</p>'; | |||
h += '<button class="jepbtn jepreveal" onclick="jep520reset()">Play Again</button>'; | |||
h += '</div>'; | |||
game.innerHTML = h; | |||
} | } | ||
function startTimer() { | function startTimer() { | ||
st.tmr = 30; | |||
st.ti = setInterval(function() { | |||
st.tmr--; | |||
if(st.tmr <= 0) { | |||
clearInterval(st.ti); | |||
if ( | st.ti = null; | ||
clearInterval( | |||
} | } | ||
renderQuestion(); | |||
}, 1000); | }, 1000); | ||
} | } | ||
function stopTimer() { | function stopTimer() { | ||
if ( | if(st.ti) { | ||
clearInterval( | clearInterval(st.ti); | ||
st.ti = null; | |||
} | } | ||
} | } | ||
window.jep520click = function(c, r) { | |||
var k = c+'-'+r; | |||
if(st.done[k]) return; | |||
sndSelect(); | |||
st.cur = {c:c, r:r}; | |||
var | |||
if ( | |||
startTimer(); | startTimer(); | ||
} | renderQuestion(); | ||
}; | |||
function | window.jep520reveal = function() { | ||
stopTimer(); | stopTimer(); | ||
sndReveal(); | |||
renderAnswer(); | |||
}; | |||
} | |||
function | window.jep520ans = function(correct) { | ||
stopTimer(); | stopTimer(); | ||
if (correct) { | var q = cats[st.cur.c].q[st.cur.r]; | ||
if(correct) { | |||
sndCorrect(); | |||
if(st.tm===1) st.sc1 += q.pts; else st.sc2 += q.pts; | |||
} else { | } else { | ||
sndWrong(); | |||
if(st.tm===1) st.sc1 -= q.pts; else st.sc2 -= q.pts; | |||
} | } | ||
st.done[st.cur.c+'-'+st.cur.r] = true; | |||
st.tm = st.tm===1 ? 2 : 1; | |||
st.cur = null; | |||
if(Object.keys(st.done).length === cats.length * 5) { | |||
renderGameOver(); | |||
if ( | |||
} else { | } else { | ||
renderBoard(); | |||
} | } | ||
}; | |||
window.jep520reset = function() { | |||
stopTimer(); | stopTimer(); | ||
st.sc1 = 0; | |||
st.sc2 = 0; | |||
st.tm = 1; | |||
st.done = {}; | |||
st.cur = null; | |||
st.tmr = 30; | |||
renderBoard(); | |||
}; | |||
} | |||
function | window.jep520mute = function() { | ||
st.mute = !st.mute; | |||
renderBoard(); | |||
} | }; | ||
renderBoard(); | |||
})(); | })(); | ||
</script> | </script> | ||
</div></includeonly> | </div></includeonly> | ||
Revision as of 01:04, 11 January 2026
Nursing Pharmacology Jeopardy Game for NSG 520 - Pathophysiology and Pharmacology
Usage
{{#widget:520Jeapordy}}