Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
server_game_lifecycle_strategy.h
Go to the documentation of this file.
1#ifndef SERVER_GAME_LIFECYCLE_STRATEGY_H
2#define SERVER_GAME_LIFECYCLE_STRATEGY_H
3
4class Server_Game;
5
13{
14public:
15 virtual ~Server_GameLifecycleStrategy() = default;
16
18 enum class StartAction
19 {
22 };
23
29};
30
42
43#endif
Default lifecycle strategy that never intercepts the game start.
Definition server_game_lifecycle_strategy.h:35
StartAction onGameStarting(Server_Game *) override
Called when a game is about to start.
Definition server_game_lifecycle_strategy.h:37
Strategy hook invoked around a game's lifecycle transitions.
Definition server_game_lifecycle_strategy.h:13
StartAction
How the game start should proceed after this hook returns.
Definition server_game_lifecycle_strategy.h:19
@ Handled
The strategy handled the start; abort the normal flow.
Definition server_game_lifecycle_strategy.h:21
@ ProceedNormal
Continue with the normal game start flow.
Definition server_game_lifecycle_strategy.h:20
virtual ~Server_GameLifecycleStrategy()=default
virtual StartAction onGameStarting(Server_Game *game)=0
Called when a game is about to start.
Definition server_game.h:52