Technique swapping implementation

This commit is contained in:
2026-06-12 16:46:03 -07:00
parent 121f2f7498
commit fa37cffe47
10 changed files with 724 additions and 128 deletions

View File

@@ -89,7 +89,9 @@ def get_game_state(game_id: str, player_id: str, db: Session = Depends(get_sessi
# admin_key stays hidden except from Admins, who need it to open the admin panel
"game": game.model_dump(exclude=(set() if player.is_admin else {"admin_key"})),
"player": player.model_dump(),
"players": [p.model_dump() for p in game.players],
# A swap offer must reveal nothing but its existence: only the offerer
# gets to see which technique they put on the table.
"players": [p.model_dump(exclude=(set() if p.id == player.id else {"swap_offer_technique"})) for p in game.players],
"obstacles": [o.model_dump() for o in game.obstacles],
"challenges": [c.model_dump() for c in game.challenges],
"votes": [v.model_dump() for v in game.votes],