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:
viewerPlayerId

The seat this view is built for.

tableViewSnapshot

The viewer’s redacted view of the board.

turnint

The current turn number.

activePlayerId

The seat whose turn it is.

phasePhase

The current phase.

first_playerPlayerId

The seat that took the first turn.

golddict mapping PlayerId to int

Every seat’s gold pool — public to both seats.

favor_holderPlayerId or None

The seat holding the Imperial Favor, or None.

pendingDecisionRequest or None

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.

Methods

GameView.__init__(viewer, table, turn, ...)

Attributes

viewer

table

turn

active

phase

first_player

gold

favor_holder

pending