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

Strategy hook invoked when a game has finished to decide the match result. More...

#include <server_match_result_strategy.h>

Inheritance diagram for Server_MatchResultStrategy:
[legend]

Public Member Functions

virtual ~Server_MatchResultStrategy ()=default
virtual bool onGameFinished (Server_Game *game, int playing, Server_AbstractPlayer *lastPlayer)=0
 Called when a game has finished.

Detailed Description

Strategy hook invoked when a game has finished to decide the match result.

Subclasses can report the match outcome (e.g. to a tournament backend) and decide whether the game should be closed permanently; the default implementation never closes the game, preserving the normal return-to-lobby behavior.

Constructor & Destructor Documentation

◆ ~Server_MatchResultStrategy()

virtual Server_MatchResultStrategy::~Server_MatchResultStrategy ( )
virtualdefault

Member Function Documentation

◆ onGameFinished()

virtual bool Server_MatchResultStrategy::onGameFinished ( Server_Game * game,
int playing,
Server_AbstractPlayer * lastPlayer )
pure virtual

Called when a game has finished.

Returns
Whether the game has been decided and should be closed.

Implemented in Server_NullMatchResultStrategy.


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