Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Enumerations | Functions
game_speed.h File Reference
#include <iosfwd>
#include <vector>
Include dependency graph for game_speed.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum class  game_speed {
  slowest , slower , slow , normal ,
  fast , faster , fastest
}
 The game speed. More...
 

Functions

std::vector< game_speedget_all_game_speeds () noexcept
 Get all the game_speeds.
 
constexpr game_speed get_default_game_speed ()
 Get the default game speed.
 
game_speed get_next (const game_speed speed) noexcept
 Get the next game speed, i.e.
 
game_speed get_previous (const game_speed speed) noexcept
 Get the previous game speed, i.e.
 
void test_game_speed ()
 Test this class and its free functions.
 
double get_speed_multiplier (const game_speed speed) noexcept
 Convert the game speed to a speed multiplier, where game_speed::normal denotes the baseline speed of 1 chess move per second.
 
std::string to_human_str (const game_speed speed) noexcept
 
std::string to_str (const game_speed speed) noexcept
 
std::ostream & operator<< (std::ostream &os, const game_speed speed) noexcept
 

Enumeration Type Documentation

◆ game_speed

enum class game_speed
strong

The game speed.

The game speed, expressed in human language.

Enumerator
slowest 
slower 
slow 
normal 
fast 
faster 
fastest 

Function Documentation

◆ get_all_game_speeds()

std::vector< game_speed > get_all_game_speeds ( )
noexcept

Get all the game_speeds.

◆ get_default_game_speed()

constexpr game_speed get_default_game_speed ( )
constexpr

Get the default game speed.

◆ get_next()

game_speed get_next ( const game_speed  speed)
noexcept

Get the next game speed, i.e.

when the user presses right

◆ get_previous()

game_speed get_previous ( const game_speed  speed)
noexcept

Get the previous game speed, i.e.

when the user presses left

◆ get_speed_multiplier()

double get_speed_multiplier ( const game_speed  speed)
noexcept

Convert the game speed to a speed multiplier, where game_speed::normal denotes the baseline speed of 1 chess move per second.

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const game_speed  speed 
)
noexcept

◆ test_game_speed()

void test_game_speed ( )

Test this class and its free functions.

◆ to_human_str()

std::string to_human_str ( const game_speed  speed)
noexcept

◆ to_str()

std::string to_str ( const game_speed  speed)
noexcept