forked from doxman/chamber-crawler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfloor.h
44 lines (40 loc) · 923 Bytes
/
floor.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
#ifndef __FLOOR_H__
#define __FLOOR_H__
#include "display.h"
#include "object.h"
#include <vector>
const int numChambers = 5;
const int potionsSpawned = 10;
const int goldsSpawned = 10;
const int enemiesSpawned = 20;
struct Chamber
{
std::vector<posn> tiles;
};
class Floor
{
Display *d;
Chamber chambers[numChambers];
Player player;
Stairs stairs;
Potion potions[potionsSpawned];
Gold golds[goldsSpawned];
Enemy enemies[enemiesSpawned];
int playerChamber; // Stores which chamber the player spawned in
int numPotions;
int numGolds;
int numEnemies;
void flood(char floodChar, char ***gridptr, int r, int c, int chamberNum);
void floodGrid(char **grid);
void unfloodGrid(char **grid);
void spawnObject(char c); // Spawns a different object depending on the symbol given
void sortEnemies();
void moveEnemy(Enemy *e);
public:
Floor();
~Floor();
void init();
void round();
void print();
};
#endif