-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnoble.h
47 lines (35 loc) · 1.2 KB
/
noble.h
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
43
44
45
46
47
// noble.h: Definition of Noble data structure.
// A noble is nothing more than a prestige point boost with an associated cost.
//
// Created by eitan on 11/25/15.
//
#pragma once
#include "gems.h"
#include <iosfwd>
namespace grandeur {
struct Noble {
public:
constexpr Noble(const Gems& cost, points_t points)
: cost_(cost), points_(points)
{}
Gems cost_;
points_t points_;
};
bool operator==(const Noble& lhs, const Noble& rhs);
std::ostream& operator<<(std::ostream&, const Noble&);
// Mapping from no. of players to no. of nobles initially allocated to board:
static constexpr const gem_count_t g_noble_allocation[] = { -1, -1, 3, 4, 5 };
// Full set of nobles, from which some will be allocated to board randomly
static constexpr const Noble g_nobles[] = {
{ { 0, 0, 3, 3, 3 }, 3 }, // 0
{ { 3, 3, 3, 0, 0 }, 3 }, // 1
{ { 3, 3, 0, 0, 3 }, 3 }, // 2
{ { 0, 3, 3, 3, 0 }, 3 }, // 3
{ { 3, 0, 0, 3, 3 }, 3 }, // 4
{ { 4, 4, 0, 0, 0 }, 3 }, // 5
{ { 0, 4, 4, 0, 0 }, 3 }, // 6
{ { 0, 0, 4, 4, 0 }, 3 }, // 7
{ { 4, 0, 0, 0, 4 }, 3 }, // 8
{ { 0, 0, 4, 0, 4 }, 3 } // 9
};
} // namespace