-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcell.h
41 lines (36 loc) · 810 Bytes
/
cell.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
//
// cell.hpp
// test
//
// Created by Wang Annan on 2016-11-19.
// Copyright © 2016 Wang Annan. All rights reserved.
//
#ifndef cell_h
#define cell_h
#include <string>
#include <iostream>
class CellObject;
class TextDisplay;
class cell {
int x = 0;
int y = 0;
bool can_spawn = false;
bool can_pass = false;
CellObject *object;
public:
cell();
int getX() const;
int getY() const;
std::string getType() const;
bool CanSpawn() const;
bool CanPass() const;
CellObject * getOb() const;
void clear();
void rm_object();
void change_can_pass(const bool &);
void change_can_spawn(const bool &);
void notify(TextDisplay *td);
void setCoord (const int &row, const int &col);
void setOb (CellObject *object);
};
#endif /* cell_hpp */