Cavoke  1.1.0
A Platform for creating and hosting multiplayer turn-based board games
Loading...
Searching...
No Matches
cavoke::server::model::GameLogicManager Class Reference

Public Member Functions

 GameLogicManager (std::shared_ptr< GamesStorage > games_storage)
 
ValidationResult validate_settings (const std::string &game_id, const json &settings, const std::vector< int > &occupied_positions)
 
GameStateStorage::GameState init_state (const std::string &game_id, const json &settings, const std::vector< int > &occupied_positions)
 
GameStateStorage::GameState send_move (const std::string &game_id, const cavoke::GameMove &move)
 

Public Attributes

const int LOGIC_TIMEOUT_MS = 500
 
const int MAX_GAME_RESPONSE_B = 8 * 1024
 

Detailed Description

Definition at line 17 of file game_logic_manager.h.

Constructor & Destructor Documentation

◆ GameLogicManager()

cavoke::server::model::GameLogicManager::GameLogicManager ( std::shared_ptr< GamesStorage games_storage)
explicit

Definition at line 13 of file game_logic_manager.cpp.

Member Function Documentation

◆ init_state()

GameStateStorage::GameState cavoke::server::model::GameLogicManager::init_state ( const std::string &  game_id,
const json &  settings,
const std::vector< int > &  occupied_positions 
)

Definition at line 77 of file game_logic_manager.cpp.

◆ send_move()

GameStateStorage::GameState cavoke::server::model::GameLogicManager::send_move ( const std::string &  game_id,
const cavoke::GameMove &  move 
)

Definition at line 106 of file game_logic_manager.cpp.

◆ validate_settings()

cavoke::ValidationResult cavoke::server::model::GameLogicManager::validate_settings ( const std::string &  game_id,
const json &  settings,
const std::vector< int > &  occupied_positions 
)

Definition at line 48 of file game_logic_manager.cpp.

Member Data Documentation

◆ LOGIC_TIMEOUT_MS

const int cavoke::server::model::GameLogicManager::LOGIC_TIMEOUT_MS = 500

Definition at line 28 of file game_logic_manager.h.

◆ MAX_GAME_RESPONSE_B

const int cavoke::server::model::GameLogicManager::MAX_GAME_RESPONSE_B = 8 * 1024

Definition at line 29 of file game_logic_manager.h.


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