-
Notifications
You must be signed in to change notification settings - Fork 1
/
square.h
31 lines (24 loc) · 1.09 KB
/
square.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
#ifndef SQUARE_H
#define SQUARE_H
#include <vector>
#include "subject.h"
#include "info.h"
class Building;
class Player;
enum class SpecialType {Academic, Residence, Gym, TimsLine, GoToTims, Osap, SLC, NH , Goose, Tuition, Coop };
class Square : public Subject<Info> {
const int BuildingRow, BuildingCol, PlayerRow, PlayerCol; // rmb to construct
std::vector<Player*> players;
const SpecialType type;
Building *b;
public:
Square(int BuildingRow, int BuildingCol, int PlayerRow, int PlayerCol, SpecialType type, Building *b) : BuildingRow{BuildingRow}, BuildingCol{BuildingCol}, PlayerRow{PlayerRow}, PlayerCol{PlayerCol}, type{type}, b{b} {}
Square(int BuildingRow, int BuildingCol, int PlayerRow, int PlayerCol, SpecialType type): BuildingRow{BuildingRow}, BuildingCol{BuildingCol}, PlayerRow{PlayerRow}, PlayerCol{PlayerCol}, type{type}, b{nullptr} {}
Building *getBuilding();
SpecialType checkType();
Info getInfo() const override;
void addPlayer(Player* p);
void removePlayer(Player* p);
~Square() override;
};
#endif