-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPropertyManager.h
35 lines (29 loc) · 976 Bytes
/
PropertyManager.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
//
// Created by mfbut on 1/27/2018.
//
#ifndef HOARDINGCPPVERSION_PROPERTYMANAGER_H
#define HOARDINGCPPVERSION_PROPERTYMANAGER_H
#include <map>
#include <vector>
#include "Property.h"
#include "PropertySet.h"
namespace Monopoly {
class Board;
class Player;
class PropertyManager {
public:
explicit PropertyManager(const Board& board);
PropertyManager(const PropertyManager& orig) = default;
void takeOwnershipOf(Property& property);
void takeOwnershipOf(PropertySet& propertySet);
bool ownsEntireSet(const int setId) const;
void givePropertiesTo(PropertyManager& receiver);
void updateOwner(Player& newOwner);
int getValue() const;
std::vector<Property*> getUpgradeableProperties(const Rules& rules, const int available_cash) const;
std::vector<Property*> getDowngradeableProperties(const Rules& rules) const;
private:
std::map<int, PropertySet> propertySets;
};
}
#endif //HOARDINGCPPVERSION_PROPERTYMANAGER_H