-
Notifications
You must be signed in to change notification settings - Fork 0
/
floor.h
40 lines (29 loc) · 855 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
#ifndef FLOOR_H
#define FLOOR_H
#include <vector>
#include <string>
#include <memory>
#include "cell.h"
class Entity;
class Floor {
// Environment is the tiles, walls, passage, etc.
std::vector<std::vector<Cell>> environment;
// Hardcoded board sizes
static const int WIDTH = 79;
static const int HEIGHT = 25;
static const int NUM_CHAMBERS = 5;
public:
void readMap(std::string filename);
int chamberAt(int x, int y);
int chamberAt(std::shared_ptr<Entity> e);
int getRandomChamberNum();
int getRandomX();
int getRandomY();
Cell cellAt(int x, int y);
int getWidth();
int getHeight();
// Return the environment vector as chars (not Cells)
// for game display
std::vector<std::vector<char>> getEnvironmentChar();
};
#endif