Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Public Member Functions | List of all members
game_log Class Reference

The text log in the game. More...

#include <game_log.h>

Public Member Functions

 game_log (const double display_time_secs)
 
void add_message (const message &m) noexcept
 Add a message, timestamp will be added.
 
std::string get_last_messages (const chess_color color) const
 Get the last messages that were emitted at most 'max_elapsed_time_secs' seconds ago, as a (possibly) multi-line string, for a specific color.
 
void tick ()
 Update, so old messages are removed.
 

Detailed Description

The text log in the game.

Note
This class cannot be called log, due to conflicts with std::log

Constructor & Destructor Documentation

◆ game_log()

game_log::game_log ( const double  display_time_secs)
explicit
Parameters
display_time_secsthe time a message will be displayed

Member Function Documentation

◆ add_message()

void game_log::add_message ( const message m)
noexcept

Add a message, timestamp will be added.

◆ get_last_messages()

std::string game_log::get_last_messages ( const chess_color  color) const

Get the last messages that were emitted at most 'max_elapsed_time_secs' seconds ago, as a (possibly) multi-line string, for a specific color.

◆ tick()

void game_log::tick ( )

Update, so old messages are removed.


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