yasuki_core.engine.rules.projection.GameView#
- class GameView(viewer, table, turn, active, phase, first_player, gold, favor_holder, pending)[source]#
A per-seat projection of a
GameState— everything one seat is entitled to see.The table is redacted for the viewer (the opponent’s hand, face-down cards, and deck contents appear as backs); the turn-level rules fields are public to both seats; and a pending decision reaches only the seat that must answer it.
- Attributes:
- viewer
PlayerId The seat this view is built for.
- table
ViewSnapshot The viewer’s redacted view of the board.
- turn
int The current turn number.
- active
PlayerId The seat whose turn it is.
- phase
Phase The current phase.
- first_player
PlayerId The seat that took the first turn.
- gold
dictmappingPlayerIdtoint Every seat’s gold pool — public to both seats.
- favor_holder
PlayerIdorNone The seat holding the Imperial Favor, or None.
- pending
DecisionRequestorNone The decision the viewer must answer, or None when nothing is awaited from this viewer — including when the engine is instead waiting on the other seat.
- viewer
Methods
GameView.__init__(viewer, table, turn, ...)Attributes
viewertableturnactivephasefirst_playergoldfavor_holderpending