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

The game logic. More...

#include <game.h>

Public Member Functions

 game (const std::vector< piece > &pieces=get_standard_starting_pieces())
 
auto & get_pieces () noexcept
 Get all the pieces.
 
const auto & get_pieces () const noexcept
 Get all the pieces.
 
const auto & get_in_game_time () const noexcept
 Get the in-game time.
 
const auto & get_winner () const noexcept
 
void tick (const delta_t &dt)
 Go to the next frame.
 

Friends

game create_game_with_starting_position (starting_position_type t) noexcept
 

Detailed Description

The game logic.

All data types used by this class are STL and/or Boost

This class is part of an MVC Design Pattern:

The game_options} are a singleton

Constructor & Destructor Documentation

◆ game()

game::game ( const std::vector< piece > &  pieces = get_standard_starting_pieces())
explicit

Member Function Documentation

◆ get_in_game_time()

const auto & game::get_in_game_time ( ) const
inlinenoexcept

Get the in-game time.

The game and pieces should agree on the in-game time.

◆ get_pieces() [1/2]

const auto & game::get_pieces ( ) const
inlinenoexcept

Get all the pieces.

◆ get_pieces() [2/2]

auto & game::get_pieces ( )
inlinenoexcept

Get all the pieces.

◆ get_winner()

const auto & game::get_winner ( ) const
inlinenoexcept

◆ tick()

void game::tick ( const delta_t &  dt)

Go to the next frame.

The maximum timestep is 0.25 chess moves. Use the global tick function for timesteps longer than 0.25 chess moves.

Friends And Related Symbol Documentation

◆ create_game_with_starting_position

game create_game_with_starting_position ( starting_position_type  t)
friend

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