-
Notifications
You must be signed in to change notification settings - Fork 0
/
universe.hpp
40 lines (30 loc) · 858 Bytes
/
universe.hpp
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
#ifndef __UNIVERSE_HPP__
#define __UNIVERSE_HPP__
#include "game.hpp"
#include "board.hpp"
#include <bitset>
#include <string>
#include <boost/optional.hpp>
namespace battlemints {
struct universe {
static const unsigned MAGIC = 0xBA77135A;
static const int VERSION = 2;
static universe instance;
static boost::optional<std::string> name;
static void set_default_name();
static void set_name(std::string const &n);
static void clear_name();
static std::string filename(std::string const &nm);
void set_default();
void load(std::string const &nm);
void save(std::string const &nm);
unsigned magic;
int version;
int saved;
std::bitset<NUM_GOALS> achieved_goals;
std::bitset<NUM_COLOR_SWITCHES> flipped_color_switches;
board_name current_map;
int current_checkpoint;
};
}
#endif