Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
action_number.h
Go to the documentation of this file.
1#ifndef ACTION_NUMBER_H
2#define ACTION_NUMBER_H
3
4#include <iosfwd>
5#include <vector>
6
12{
13public:
14 explicit action_number(const int number);
15
16 int get_number() const noexcept { return m_number; }
17
18private:
19
20 int m_number;
21};
22
24std::vector<action_number> get_all_action_numbers() noexcept;
25
29action_number get_next(const action_number& n) noexcept;
30
35
38
39bool operator==(const action_number& lhs, const action_number& rhs) noexcept;
40bool operator<(const action_number& lhs, const action_number& rhs) noexcept;
41std::ostream& operator<<(std::ostream& os, const action_number& number) noexcept;
42
43#endif // ACTION_NUMBER_H
std::vector< action_number > get_all_action_numbers() noexcept
Get all the action_numbers in increasing height.
Definition action_number.cpp:13
action_number get_next(const action_number &n) noexcept
Get the next action_number, e.g.
Definition action_number.cpp:25
action_number get_previous(const action_number &n) noexcept
Get the previous action_number, e.g.
Definition action_number.cpp:32
void test_action_number()
Test this class and its members.
Definition action_number.cpp:39
The number of an action.
Definition action_number.h:12
int get_number() const noexcept
Definition action_number.h:16