Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
game_speed.h
Go to the documentation of this file.
1#ifndef GAME_SPEED_H
2#define GAME_SPEED_H
3
4#include <iosfwd>
5#include <vector>
6
10enum class game_speed
11{
13};
14
16std::vector<game_speed> get_all_game_speeds() noexcept;
17
20
23game_speed get_next(const game_speed speed) noexcept;
24
27game_speed get_previous(const game_speed speed) noexcept;
28
30void test_game_speed();
31
35double get_speed_multiplier(const game_speed speed) noexcept;
36
37std::string to_human_str(const game_speed speed) noexcept;
38
39std::string to_str(const game_speed speed) noexcept;
40
41std::ostream& operator<<(std::ostream& os, const game_speed speed) noexcept;
42
43#endif // GAME_SPEED_H
std::string to_str(const game_speed speed) noexcept
Definition game_speed.cpp:129
constexpr game_speed get_default_game_speed()
Get the default game speed.
Definition game_speed.h:19
game_speed get_previous(const game_speed speed) noexcept
Get the previous game speed, i.e.
Definition game_speed.cpp:34
std::vector< game_speed > get_all_game_speeds() noexcept
Get all the game_speeds.
Definition game_speed.cpp:10
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 ...
Definition game_speed.cpp:103
game_speed get_next(const game_speed speed) noexcept
Get the next game speed, i.e.
Definition game_speed.cpp:20
void test_game_speed()
Test this class and its free functions.
Definition game_speed.cpp:48
std::string to_human_str(const game_speed speed) noexcept
Definition game_speed.cpp:121
std::ostream & operator<<(std::ostream &os, const game_speed speed) noexcept
Definition game_speed.cpp:135
game_speed
The game speed.
Definition game_speed.h:11