-
Notifications
You must be signed in to change notification settings - Fork 0
/
emptyCell.h
29 lines (25 loc) · 995 Bytes
/
emptyCell.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
#ifndef EMPTYCELL_H
#define EMPTYCELL_H
#include "cell.h"
struct EmptyCell final : public Cell {
// protected:
// int x = 0, y = 0; inherited from Cell
// bool isOccupied = false; inherited from Cell
// Stuff *occupant = nullptr; inherited from Cell
// TextDisplay *td = nullptr; inherited from Cell
public:
EmptyCell(int x, int y) : Cell{x, y} {
isOccupied = true;
}
char getChar() const override {return ' ';} // inherited from Cell
bool checkOccupancy() const override { return true;} // inherited from Cell
// void setObserver(TextDisplay *td) { this->td = td;}; inherited from Cell
// void notifyObserver() { td->notify(x,y,getChar()); }; inherited from Cell
// Stuff * getOccupant(); inherited from Cell
// Stuff* detachStuff(); inherited from Cell
// void setOccupancy; inherited from Cell
// void setOccupant; inherited from Cell
// int getX() const; inherited from Cell
// int getY() const; inherited from Cell
};
#endif