Commit ·
732f6ed
1
Parent(s): c0df9f8
Split C (part 1): declutter outcome + centred avatars + magic-cups framing
Browse files- main outcome: removed the top 'you earned' text and the mid floating coins; the single
feedback is now the coin above each avatar
- you + partner brought together and CENTRED at the bottom (cooperative, not versus); coins
appear above each (the landing spot for the upcoming float animation)
- practice: one-sentence who-earned-what at the top (clear of window/lamp) + teaching tip
- magic-cups framing for the side-switching: HOW_TO_PLAY line + a practice tip
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
446 unmodified lines44744844945045145245345445545645732 unmodified lines490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524234 unmodified lines759760761762763764765766446 unmodified linesreturn f"0 points for {who}"# rotating teaching tips shown during the practice house (cycle one per try)PRACTICE_TIPS = ["Each try always wins OR loses coins for both you and your partner.","Your partner does not play - they only get coins from your choices.","Where a chest sits does not matter - only what is inside it does.","These coins become REAL bonus money at the end, for both of you.","The chests in a house are not equal - some give coins more often.",]32 unmodified linessprites.draw_key(d, x + cw // 2 - 12, table_top + 4,sprites.stim_color(stim))# ---- top-center prompt / verbose feedback ----if mode == M_CHOICE:T(d, W // 2, 12, "Pick a chest to open: press <- or ->", size=22, bold=True,fill=accent, center=True, outline=True)else:cx = (lx if chosen_side == 0 else rx) + cw // 2sprites.draw_coin(d, cx - 32, y0 - 42, s_out)sprites.draw_coin(d, cx + 32, y0 - 42, o_out)T(d, cx - 32, y0 - 74, "YOU", size=14, bold=True, fill=(255, 255, 255), center=True, outline=True)T(d, cx + 32, y0 - 74, "PARTNER", size=14, bold=True, fill=(255, 255, 255), center=True, outline=True)T(d, W // 2, 8, _earn(s_out, "YOURSELF"), size=18, bold=True, fill=accent, center=True, outline=True)T(d, W // 2, 34, _earn(o_out, "your PARTNER"), size=18, bold=True, fill=accent, center=True, outline=True)# ---- practice: a rotating teaching tip, shown ONLY during the amount-feedback (OUTCOME),# NOT while choosing, in the gap below the table legs (end floor_y+40) and above the# bottom YOU/PARTNER labels (at H-98) ----if practice and mode == M_OUTCOME:tip = PRACTICE_TIPS[trial % len(PRACTICE_TIPS)]T(d, W // 2, floor_y + 62, tip, size=13, bold=True, fill=(255, 120, 120),center=True, outline=True)# ---- you + partner at the bottom; show only THIS try's outcome (never a running score) ----sprites.draw_character(d, 120, H - 12, 1, 0, **_player_pal())sprites.draw_character(d, W - 120, H - 12, 1, 0, **sprites.PARTNER_PAL)T(d, 120, H - 98, "YOU", size=15, bold=True, fill=(255, 255, 255), center=True, outline=True)T(d, W - 120, H - 98, "PARTNER", size=15, bold=True, fill=(255, 255, 255), center=True, outline=True)if mode == M_OUTCOME:T(d, 120, H - 78, _amt(s_out), size=26, bold=True, fill=(255, 235, 140), center=True, outline=True)T(d, W - 120, H - 78, _amt(o_out), size=26, bold=True, fill=(255, 235, 140), center=True, outline=True)return img234 unmodified lines- **Walk** with the **arrow keys**, and step onto a house to go inside.- Inside are **two unique chests**. Press the **left** or **right** **arrow key** on yourkeyboard to open that chest.- Each **unique chest** brings a certain amount of coins — that's what matters. Watch out:the chests can **swap sides**, so don't click too fast!- The chest **opens and shows** what you and your partner got. After a couple of seconds a**Press SPACE** prompt appears — press **Space** to close it and start the next try.- Each house gives you **20 tries** — choose carefully, and finish all 20 before leaving446 unmodified lines44744844945045145245345445545645745845946046146246346446546646746832 unmodified lines501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531234 unmodified lines766767768769770771772773774446 unmodified linesreturn f"0 points for {who}"def _earn_combined(s, o):"""One short sentence summarising both outcomes (for the practice top line)."""def part(v, who):if v > 0:return f"{who} earned {v}"if v < 0:return f"{who} lost {abs(v)}"return f"{who} got 0"return f"{part(s, 'You')}, {part(o, 'your partner')}."# rotating teaching tips shown during the practice house (cycle one per try)PRACTICE_TIPS = ["Each try always wins OR loses coins for both you and your partner.","Your partner does not play - they only get coins from your choices.","The chests shuffle like a magic cups game - follow the chest, not the side!","These coins become REAL bonus money at the end, for both of you.","The chests in a house are not equal - some give coins more often.",]32 unmodified linessprites.draw_key(d, x + cw // 2 - 12, table_top + 4,sprites.stim_color(stim))# ---- top line ----if mode == M_CHOICE:T(d, W // 2, 12, "Pick a chest to open: press <- or ->", size=22, bold=True,fill=accent, center=True, outline=True)elif practice:# practice only: one-sentence who-earned-what at the very top (clear of window/lamp)T(d, W // 2, 26, _earn_combined(s_out, o_out), size=17, bold=True,fill=(255, 230, 120), center=True, outline=True)# ---- practice teaching tip, below the table legs ----if practice and mode == M_OUTCOME:tip = PRACTICE_TIPS[trial % len(PRACTICE_TIPS)]T(d, W // 2, floor_y + 62, tip, size=13, bold=True, fill=(255, 120, 120),center=True, outline=True)# ---- you + partner, brought together and CENTRED (cooperative, not versus). The single# coin feedback shows above each (this is where coins will float to in the animation) ----you_x, par_x = W // 2 - 78, W // 2 + 78sprites.draw_character(d, you_x, H - 12, 1, 0, **_player_pal())sprites.draw_character(d, par_x, H - 12, 1, 0, **sprites.PARTNER_PAL)T(d, you_x, H - 118, "YOU", size=15, bold=True, fill=(255, 255, 255), center=True, outline=True)T(d, par_x, H - 118, "PARTNER", size=15, bold=True, fill=(255, 255, 255), center=True, outline=True)if mode == M_OUTCOME:sprites.draw_coin(d, you_x, H - 74, s_out)sprites.draw_coin(d, par_x, H - 74, o_out)return img234 unmodified lines- **Walk** with the **arrow keys**, and step onto a house to go inside.- Inside are **two unique chests**. Press the **left** or **right** **arrow key** on yourkeyboard to open that chest.- Each **unique chest** brings a certain amount of coins — that's what matters. The chests**shuffle and swap places** between tries, like a **magic cups game** — keep your eye onthe **chest** itself, not which side it's on!- The chest **opens and shows** what you and your partner got. After a couple of seconds a**Press SPACE** prompt appears — press **Space** to close it and start the next try.- Each house gives you **20 tries** — choose carefully, and finish all 20 before leaving
experiment_structure.py+31-23