-
Notifications
You must be signed in to change notification settings - Fork 0
/
Floor.h
32 lines (21 loc) · 652 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
#ifndef __FLOOR_H__
#define __FLOOR_H__
#include "MapObject.h"
// constant floor character for screen drawing
const char FLOOR_CHAR = '_';
class Floor : public MapObject {
private:
int length; // length of the section of floor
public:
// constructor for floor needs length of section of floor
Floor(df::Position init_pos, int init_length);
// get the length of the section of floor
int getLength() const;
// set the length of the section of floor
void setLength(int new_length);
// return true if position falls on floor, false otherwise
bool onMapObject(df::Position pos) const;
// Draw the floor in place
void draw();
};
#endif