qmlfrontend/game_config.h
author Wuzzy <Wuzzy2@mail.ru>
Mon, 17 Jun 2019 19:33:43 +0200
changeset 15173 e1dbe2c9026f
parent 14278 645e4591361f
permissions -rw-r--r--
ACF10: Show proper messages when everyone dies If everyone died, the game cannot continue, but you still win (since it's a sandbox mission).

#ifndef GAMECONFIG_H
#define GAMECONFIG_H

#include <QList>
#include <QVector>

#include "team.h"

class GameConfig {
 public:
  explicit GameConfig();

  const char** argv() const;
  int argc() const;
  const QList<QByteArray> config() const;

  void clear();
  void cmdSeed(const QByteArray& seed);
  void cmdTheme(const QByteArray& theme);
  void cmdMapgen(int mapgen);
  void cmdTeam(const Team& team);

 private:
  mutable QVector<const char*> m_argv;
  QList<QByteArray> m_arguments;
  QList<QByteArray> m_cfg;
  QList<Team> m_teams;

  void cfgAppend(const QByteArray& cmd);
};

#endif  // GAMECONFIG_H