-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.h
46 lines (32 loc) · 1018 Bytes
/
config.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
// Config: a class to initialize and manage game configuration.
// Specifically, the parameters managed are those that the user can control
// through the command line.
//
// Created by eitan on 12/2/15.
//
#pragma once
#include "logger.h"
#include "player.h"
#include <fstream>
#include <random>
#include <string>
#include <vector>
namespace grandeur {
class Config {
public:
// Initialize all controllable game parameters from command line args:
Config(const std::vector<std::string>& args);
~Config();
// Exit program with error message:
void die(const std::string msg = "");
// Shuffle cards and nobles to create randomized game Board:
Board createBoard(Cards& deck);
// Delete old player and replace with new ones:
void resetPlayers(const Players& newPlayers);
std::mt19937_64 prng_; // A PRNG to initialize game state:
Players players_;
unsigned nthread_ = 0; // No. of threads to run
private:
Logger* loggerPtr_ = nullptr;
};
} // namespace