-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScene.h
More file actions
137 lines (102 loc) · 5.08 KB
/
Scene.h
File metadata and controls
137 lines (102 loc) · 5.08 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
//****************************************************************************
//
// Scene
//
//****************************************************************************
#ifndef __Scene_H__
#define __Scene_H__
// ===========================================================================
// Libraries
// ===========================================================================
#include <cstdio>
#include <cstdlib>
// ===========================================================================
// Project Files
// ===========================================================================
#include "Agent.h"
#include "Border.h"
#include "Obstacle.h"
#include "DefVal.h"
#include "bwindow.h"
// ===========================================================================
// Class declarations
// ===========================================================================
class Scene
{
public :
// =======================================================================
// Enums
// =======================================================================
// =======================================================================
// Constructors
// =======================================================================
Scene();
// =======================================================================
// Destructor
// =======================================================================
virtual ~Scene(void);
// =======================================================================
// Accessors: getters
// =======================================================================
// =======================================================================
// Accessors: setters
// =======================================================================
// =======================================================================
// Operators
// =======================================================================
// =======================================================================
// Public Methods
// =======================================================================
// Add an Obstacle to the scene
void addObstacle(double x, double y, double r);
// Add random obstacles to the scene
void addObstacle(unsigned int n);
// Add a Border to the scene
void addBorder(int type, int x1, int y1, int c2);
// Initiate an Agents array
void addAgent(int nb_prey_in_array, int nb_hunt_in_array);
// Add a hunter to the scene
void addHunter();
// Add a prey to the scene
void addPrey();
// Draw the content of the scene
void draw(bwindow& win);
// Check-up function
void checkup();
// =======================================================================
// Public Attributes
// =======================================================================
protected :
// =======================================================================
// Forbidden Constructors
// =======================================================================
// =======================================================================
// Protected Methods
// =======================================================================
// =======================================================================
// Protected Attributes
// =======================================================================
// Constants
const unsigned int MAX_WIDTH, MAX_HEIGHT, NB_BORDERS, NB_MAX_PREY, NB_MAX_HUNT;
// Parameters
unsigned int nb_prey, nb_borders, nb_hunt, nb_obstacles, dead_hunters;
// Birth speed
double prey_count, hunt_count;
// Objects
Agent** agents;
Border* borders;
Obstacle* obstacles;
};
// ===========================================================================
// Getters' definitions
// ===========================================================================
// ===========================================================================
// Setters' definitions
// ===========================================================================
// ===========================================================================
// Operators' definitions
// ===========================================================================
// ===========================================================================
// Inline functions' definition
// ===========================================================================
#endif // __Scene_H__