14143
|
1 |
#ifndef GAMECONFIG_H
|
|
2 |
#define GAMECONFIG_H
|
|
3 |
|
|
4 |
#include <QList>
|
|
5 |
#include <QVector>
|
|
6 |
|
|
7 |
#include "team.h"
|
|
8 |
|
|
9 |
class GameConfig {
|
|
10 |
public:
|
|
11 |
explicit GameConfig();
|
|
12 |
|
|
13 |
const char** argv() const;
|
|
14 |
int argc() const;
|
|
15 |
const QList<QByteArray> config() const;
|
|
16 |
|
|
17 |
void clear();
|
|
18 |
void cmdSeed(const QByteArray& seed);
|
|
19 |
void cmdTheme(const QByteArray& theme);
|
|
20 |
void cmdMapgen(int mapgen);
|
|
21 |
void cmdTeam(const Team& team);
|
|
22 |
|
|
23 |
bool isPreview() const;
|
|
24 |
void setPreview(bool isPreview);
|
|
25 |
|
|
26 |
private:
|
|
27 |
mutable QVector<const char*> m_argv;
|
|
28 |
QList<QByteArray> m_arguments;
|
|
29 |
QList<QByteArray> m_cfg;
|
|
30 |
QList<Team> m_teams;
|
|
31 |
bool m_isPreview;
|
|
32 |
|
|
33 |
void cfgAppend(const QByteArray& cmd);
|
|
34 |
};
|
|
35 |
|
|
36 |
#endif // GAMECONFIG_H
|