File: gameoptions.h

package info (click to toggle)
qonk 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,076 kB
  • ctags: 2,026
  • sloc: cpp: 14,978; sh: 3,464; makefile: 200
file content (54 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download | duplicates (3)
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
48
49
50
51
52
53
54
// gameoptions.h
//
// (c) Robert Schuster, 2007
//
// Licensed under GNU GPL version 2 or, at your option, any later version.

#ifndef GAMEOPTIONS_H
#define GAMEOPTION_H

#include <vector>

class Main;
class MenuAction;

/**
 * GameOptions takes all the possible options for a single player game and
 * allows modifying them through MenuActions.
 *
 */
class GameOptions
{
  bool enemyVisibility;

  int players;
  int planets;

  MenuAction *enemyVisibilityAction;
  MenuAction *playersAction;
  MenuAction *planetsAction;
  MenuAction *startSinglePlayerGameAction;

  public:
    GameOptions();

    void setPlayers(int);
    int getPlayers() const { return players; }

    void setPlanets(int);
    int getPlanets() const { return planets; }

    void setEnemyVisibility(bool);
    void toggleEnemyVisibility();
    bool getEnemyVisibility() const { return enemyVisibility; }

    MenuAction *getEnemyVisibilityAction();

    MenuAction *getPlayersAction();

    MenuAction *getPlanetsAction();

    MenuAction *getStartSinglePlayerGameAction(Main &);
};

#endif