blob: 96f171fa41659c65ed756cc05c623c01aeb3e5d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#ifndef STATE_H
#define STATE_H
#include <boost/shared_ptr.hpp>
#include "tile.h"
#include "action.h"
class State {
public:
typedef boost::shared_ptr<State> p;
struct Player {
//! Concealed tiles in hand.
Tiles hand;
//! Open tiles in hand.
Tiles open;
//! Discarded tiles.
Tiles pond;
template<class Archive>
void serialize(Archive & ar, const unsigned int version) {
ar & hand;
ar & open;
ar & pond;
}
};
//! State of players.
Player players[4];
//! Possible actions.
Actions possible_actions;
template<class Archive>
void serialize(Archive & ar, const unsigned int version) {
ar & players;
ar & possible_actions;
}
};
#endif
|