Commit Β·
d927f2d
1
Parent(s): 845b0e9
Practice/instruction fixes: grammar, $1-per-100, coloured quiz feedback, visible sound toggle
Browse files- practice narration grammar: 'In the dark stone/blue striped chest...' (was 'From...')
- money is $1 per 100 coins on the 10-coin scale (was wrongly '1000') β fixed in the cover
story, the quiz, and two mislabelled code comments
- quiz feedback: green checkmark for Correct, red cross for Incorrect
- sound toggle is now a solid (filled) button tucked into the very bottom-left corner so it
stays visible over the game art instead of blending in
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files changed (3)
- experiment_structure.py+7-5
- export_csv.py+1-1
- web_app.py+5-3
480 unmodified lines481482483484485486487488489490308 unmodified lines79980080180280380480532 unmodified lines83883984084184284384426 unmodified lines871872873874875876877480 unmodified linesnarration=("The same chest again: 10 coins for you and 10 for your partner.","Each unique chest is more likely to give a certain number of coins, so it's worth paying attention.")),dict(letter=3, instr="Open the dark stone chest.",narration=("From the dark stone chest you BOTH lost 10 coins to the chest β","sometimes a chest is bad for both of you.")),dict(letter=1, instr="Open the blue striped chest.",narration=("From the blue striped chest you found 10 coins for yourself, but your partner lost 10.","Your choices always affect both you and your partner, and sometimes the result differs for each of you.")),dict(letter=2, instr="Open the green dotted chest.",narration=("Sometimes it's the other way around: you found 10 coins for your partner,",308 unmodified linesEvery coin you collect **adds up across the whole game** β you won't see a running total onscreen, but they are all being counted. At the very end your coins become **real money**(**about $1 per 1000 coins, up to $6**), paid to both **you** and the **other person** as abonus pocket-money payment.**Your goal: collect as many coins as you can β for both you and your partner β** by learning32 unmodified lines"feedback throughout the game!"),("All chests are equally likely to give coins.",False, "Not quite β some unique chests are more likely to give coins than others."),("Coins turn into real money at the end (about $1 per 1000 coins, up to $6), for both you ""and your partner.",True, "Correct β both you and your partner get a bonus payment based on the coins."),("Even though you don't see a running total on screen, every coin you collect still counts "26 unmodified linesok = (val == correct)# strip a leading "Correct β" from the explanation so we don't say it twicetxt = re.sub(r"^\s*correct\s*[β\-:,]?\s*", "", feedback, flags=re.I) if ok else feedbackfb.set_content(("β **Correct!** " if ok else "β **Incorrect.** ") + txt)btn_t.disable()btn_f.disable() # once answered, can't choose againcont.set_visibility(True)480 unmodified lines481482483484485486487488489490308 unmodified lines79980080180280380480532 unmodified lines83883984084184284384426 unmodified lines871872873874875876877878879480 unmodified linesnarration=("The same chest again: 10 coins for you and 10 for your partner.","Each unique chest is more likely to give a certain number of coins, so it's worth paying attention.")),dict(letter=3, instr="Open the dark stone chest.",narration=("In the dark stone chest you BOTH lost 10 coins β","sometimes a chest is bad for both of you.")),dict(letter=1, instr="Open the blue striped chest.",narration=("In the blue striped chest you found 10 coins for yourself, but your partner lost 10 coins.","Your choices always affect both you and your partner, and sometimes the result differs for each of you.")),dict(letter=2, instr="Open the green dotted chest.",narration=("Sometimes it's the other way around: you found 10 coins for your partner,",308 unmodified linesEvery coin you collect **adds up across the whole game** β you won't see a running total onscreen, but they are all being counted. At the very end your coins become **real money**(**about $1 per 100 coins, up to $6**), paid to both **you** and the **other person** as abonus pocket-money payment.**Your goal: collect as many coins as you can β for both you and your partner β** by learning32 unmodified lines"feedback throughout the game!"),("All chests are equally likely to give coins.",False, "Not quite β some unique chests are more likely to give coins than others."),("Coins turn into real money at the end (about $1 per 100 coins, up to $6), for both you ""and your partner.",True, "Correct β both you and your partner get a bonus payment based on the coins."),("Even though you don't see a running total on screen, every coin you collect still counts "26 unmodified linesok = (val == correct)# strip a leading "Correct β" from the explanation so we don't say it twicetxt = re.sub(r"^\s*correct\s*[β\-:,]?\s*", "", feedback, flags=re.I) if ok else feedbacktag = ('<span style="color:#27ae60;font-weight:bold">β Correct!</span> ' if okelse '<span style="color:#e74c3c;font-weight:bold">β Incorrect.</span> ')fb.set_content(tag + txt)btn_t.disable()btn_f.disable() # once answered, can't choose againcont.set_visibility(True)
79 unmodified lines8081828384858679 unmodified linesdef _money(pts):return round(max(0.0, min(6.0, (pts or 0) / 100.0)), 2) # 10-coin scale -> $1 per 10 coinsdef _sign(v):79 unmodified lines8081828384858679 unmodified linesdef _money(pts):return round(max(0.0, min(6.0, (pts or 0) / 100.0)), 2) # 10-coin scale -> $1 per 100 coinsdef _sign(v):
251 unmodified lines252253254255256257258259260417 unmodified lines678679680681682683684251 unmodified lines"</script>")on = bool(app.storage.user.get("sound_on", False))btn = (ui.button(icon=("volume_up" if on else "volume_off")).props("round flat color=deep-purple-5").style("position:fixed; bottom:14px; left:14px; z-index:50; opacity:0.9;"))async def toggle():new = not bool(app.storage.user.get("sound_on", False))417 unmodified lineslogger.error("FINAL SAVE FAILED after retries")def to_money(points):return max(0.0, min(6.0, points / 100.0)) # 10-coin scale -> $1 per 10 coins, cap $6self_pts = int(app.storage.user.get("self_points", 0))partner_pts = int(app.storage.user.get("partner_points", 0))251 unmodified lines252253254255256257258259260261262417 unmodified lines680681682683684685686251 unmodified lines"</script>")on = bool(app.storage.user.get("sound_on", False))# solid (not flat) so it stays visible over the game art, tucked into the very bottom-leftbtn = (ui.button(icon=("volume_up" if on else "volume_off")).props("round color=deep-purple-6").style("position:fixed; bottom:6px; left:6px; z-index:50; opacity:0.97;""box-shadow:0 1px 5px rgba(0,0,0,0.5);"))async def toggle():new = not bool(app.storage.user.get("sound_on", False))417 unmodified lineslogger.error("FINAL SAVE FAILED after retries")def to_money(points):return max(0.0, min(6.0, points / 100.0)) # 10-coin scale -> $1 per 100 coins, cap $6self_pts = int(app.storage.user.get("self_points", 0))partner_pts = int(app.storage.user.get("partner_points", 0))
experiment_structure.py+7-5
export_csv.py+1-1
web_app.py+5-3