Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
player_event_handler.h File Reference

Player-scoped game event handler. More...

#include "event_processing_options.h"
#include <QObject>
#include <libcockatrice/protocol/pb/card_attributes.pb.h>
#include <libcockatrice/protocol/pb/game_event.pb.h>
#include <libcockatrice/protocol/pb/game_event_context.pb.h>
Include dependency graph for player_event_handler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PlayerEventHandler
 Applies player-specific game events and emits corresponding log signals. More...

Detailed Description

Player-scoped game event handler.

PlayerEventHandler applies game events that affect a single Player’s board state, zones, cards, counters, arrows, and related UI/log output.

It is invoked by GameEventHandler after basic routing and validation. Each instance is bound 1:1 to a Player and must never mutate state belonging to other players except where explicitly required by events (e.g. moving cards between players, attaching cards, arrows).

This class is intentionally stateful and tightly coupled to Player, PlayerActions, and the board/zones implementation. It performs both model mutation and UI-side bookkeeping (zone views, arrows, menus).