forked from hwauck/statue-puzzle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap.h
executable file
·99 lines (75 loc) · 2.36 KB
/
map.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
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
/*****************************************************************
COPYRIGHT (C): 2013, All Rights Reserved.
PROJECT: TowerDefense
FILE: map.h
PURPOSE: Keeps track of the visuals concerning constructed Towers, paths, and EnemyUnits
COMPILER: i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)
TARGET: Mac OS X
PROGRAMMER: Helen Wauck and Kevin Dexter
START DATE: 01/21/2013
*****************************************************************/
#ifndef MAP_H_
#define MAP_H_
#include <string>
#include <vector>
#include "Square.h"
#include "path.h"
#include "wave.h"
class Map {
public:
Map();
~Map();
Map(Path path, std::string buildableColor, std::string pathColor, double height, double width, double squareSize, vector<Wave> waves);
/* PURPOSE: draws this map in the window along with its path
*/
void draw();
/* PURPOSE: sets the coordinates of the window
*/
void initializeWindow();
/* PURPOSE: figures out which squares on the map should be part of the path
*/
void definePathSquares();
/* PURPOSE: draws the path in the window
*/
void drawPath();
/* PURPOSE: Releases the next unit from the current wave and returns it
*/
EnemyUnit nextUnit();
/* PURPOSE: removes the first wave in this map's wave vector after the wave is finished
*/
void removeWave();
Path getPath();
std::string getBuildableColor();
std::string getPathColor();
vector<vector<Square*> > getPositions();
vector<Point> getPathSquares();
vector<Wave> getWaves();
int getOffset();
void setPositions(vector<vector<Square*> > positions);
private:
/* REMARKS: this map's width in squares
*/
double WIDTH;
/* REMARKS: this map's height in squares
*/
double HEIGHT;
/* REMARKS: the path this map uses for EnemyUnits
*/
Path path;
/* REMARKS: the color for squares that the user can build towers on in this map
*/
std::string buildableColor;
/* REMARKS: the color for squares that are part of the path on this map - towers can't be built on these
*/
std::string pathColor;
/* REMARKS: keeps track of all of the squares on this map
*/
vector<vector<Square*> > positions;
/* REMARKS: keeps track of the locations of all of the squares that are part of this map's path
*/
vector<Point> pathSquares;
/* REMARKS: keeps track of all this map's waves
*/
vector<Wave> waves;
};
#endif /* MAP_H_ */