Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
Server_GameLifecycleStrategy Class Referenceabstract

Strategy hook invoked around a game's lifecycle transitions. More...

#include <server_game_lifecycle_strategy.h>

Inheritance diagram for Server_GameLifecycleStrategy:
[legend]

Public Types

enum class  StartAction { ProceedNormal , Handled }
 How the game start should proceed after this hook returns. More...

Public Member Functions

virtual ~Server_GameLifecycleStrategy ()=default
virtual StartAction onGameStarting (Server_Game *game)=0
 Called when a game is about to start.

Detailed Description

Strategy hook invoked around a game's lifecycle transitions.

Subclasses can intercept the game start to perform custom setup (e.g. draft or tournament initialization); the default implementation never intercepts.

Member Enumeration Documentation

◆ StartAction

How the game start should proceed after this hook returns.

Enumerator
ProceedNormal 

Continue with the normal game start flow.

Handled 

The strategy handled the start; abort the normal flow.

Constructor & Destructor Documentation

◆ ~Server_GameLifecycleStrategy()

virtual Server_GameLifecycleStrategy::~Server_GameLifecycleStrategy ( )
virtualdefault

Member Function Documentation

◆ onGameStarting()

virtual StartAction Server_GameLifecycleStrategy::onGameStarting ( Server_Game * game)
pure virtual

Called when a game is about to start.

Returns
How the start flow should proceed.

Implemented in Server_DefaultLifecycleStrategy.


The documentation for this class was generated from the following file: