Tower Defence 2
level.h
1 #ifndef TOWER_DEFENCE_2_LEVEL_H
2 #define TOWER_DEFENCE_2_LEVEL_H
3 
4 #include <vector>
5 #include <string>
6 #include "objects/tower.h"
7 
8 
11 typedef std::vector<std::pair<double, EnemyType *>> EnemySpawnInterval;
12 
15 class GameLevel {
16 public:
18  EnemySpawnInterval &enemy_spawn_interval);
19 
22  int initial_money() const;
23 
26  int initial_lives() const;
27 
29  int enemies_spawned() const;
30 
35  std::vector<EnemyType *> spawn_enemies(double time);
36 
38  bool done();
39 
40 private:
41  const int m_initial_money;
42  const int m_initial_lives;
43 
45  int m_enemies_spawned;
46 
47  const EnemySpawnInterval m_enemy_spawn_interval;
48 };
49 
50 
51 
52 #endif //TOWER_DEFENCE_2_LEVEL_H
bool done()
True if all enemies have spawned else false.
Definition: level.cpp:37
int initial_lives() const
Definition: level.cpp:15
int initial_money() const
Definition: level.cpp:11
std::vector< EnemyType * > spawn_enemies(double time)
Definition: level.cpp:23
Definition: level.h:15
int enemies_spawned() const
Count of how many enemies have spawned.
Definition: level.cpp:19