-
Notifications
You must be signed in to change notification settings - Fork 0
/
Model.h
54 lines (51 loc) · 1.34 KB
/
Model.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
47
48
49
50
51
52
53
54
#ifndef MODEL_H
#define MODEL_H
#include "Cart_Point.h"
#include "Cart_Vector.h"
#include "Astronaut.h"
#include "Oxygen_Depot.h"
#include "Space_Station.h"
#include "Person.h"
#include "View.h"
#include "Alien.h"
#include <list>
using namespace std;
class Model
{
private:
int time; //The simulation time
int count_down; //time left until ready for take off
//Game_Object* object_ptrs[10];
list<Game_Object*> object_ptrs;
list<Game_Object*> active_ptrs;
int num_objects;
//Person* person_ptrs[10];
list<Person*> person_ptrs;
int num_persons;
//Oxygen_Depot* depot_ptrs[10];
list<Oxygen_Depot*> depot_ptrs;
int num_depots;
//Space_Station* station_ptrs[10];
list<Space_Station*> station_ptrs;
int num_station;
//Alien* alien_ptrs[10];
list<Alien*> alien_ptrs;
int num_aliens;
Model(const Model &m1); // copy constructor
public:
Model();
Person* get_Person_ptr(int id);
Oxygen_Depot* get_Oxygen_Depot_ptr(int id);
Space_Station* get_Space_Station_ptr(int id);
Alien* get_alien_ptr(int id);
bool update();
void display(View &view);
void show_status();
~Model();
void set_depot(Oxygen_Depot* new_o);
void set_station(Space_Station* new_s);
void set_astronaut(Astronaut* new_a);
void set_alien(Alien* new_x);
string gravity; //for gravity changes
};
#endif