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

A replay. More...

#include <replay.h>

Public Member Functions

 replay (const action_history &h=action_history(), const game_controller &c=game_controller())
 
void do_move (const delta_t &dt=delta_t(1.0))
 Do a move or do nothing, for 1 time unit.
 
const auto & get_action_history () const noexcept
 Get the history of actions, from a replay.
 
const auto & get_game () const noexcept
 Get the current state of the game.
 
const auto & get_game_controller () const noexcept
 Get the current state of the game.
 
const auto & get_index () const noexcept
 The index of the next move to do in the action history.
 
const auto & get_initial_game_controller () const noexcept
 Get the current state of the game.
 
bool is_done () const noexcept
 
void reset () noexcept
 Rewind back to the start.
 

Detailed Description

A replay.

A replay plays a game again by playing the action history of a game.

Use 'do_move' to go forward in time.

Parameters
hthe action_history}, as can be created by, e.g. create_action_history_from_pgn} or create_action_history_from_game}

Constructor & Destructor Documentation

◆ replay()

replay::replay ( const action_history h = action_history(),
const game_controller c = game_controller() 
)
explicit

Member Function Documentation

◆ do_move()

void replay::do_move ( const delta_t dt = delta_t(1.0))

Do a move or do nothing, for 1 time unit.

◆ get_action_history()

const auto & replay::get_action_history ( ) const
inlinenoexcept

Get the history of actions, from a replay.

◆ get_game()

const auto & replay::get_game ( ) const
inlinenoexcept

Get the current state of the game.

◆ get_game_controller()

const auto & replay::get_game_controller ( ) const
inlinenoexcept

Get the current state of the game.

◆ get_index()

const auto & replay::get_index ( ) const
inlinenoexcept

The index of the next move to do in the action history.

◆ get_initial_game_controller()

const auto & replay::get_initial_game_controller ( ) const
inlinenoexcept

Get the current state of the game.

◆ is_done()

bool replay::is_done ( ) const
noexcept

◆ reset()

void replay::reset ( )
noexcept

Rewind back to the start.


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