1
// Copyright (c) 2001-2003 Rob Kaper <cap@capsi.com>,
2
// 2001 Erik Bourget <ebourg@cs.mcgill.ca>
4
// This program is free software; you can redistribute it and/or
5
// modify it under the terms of the GNU General Public License
6
// version 2 as published by the Free Software Foundation.
8
// This program is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
// General Public License for more details.
13
// You should have received a copy of the GNU General Public License
14
// along with this program; see the file COPYING. If not, write to
15
// the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16
// Boston, MA 02111-1307, USA.
18
#ifndef MONOP_ESTATE_H
19
#define MONOP_ESTATE_H
24
#include "gameobject.h"
32
class Estate : public GameObject
35
Estate(int id, std::vector<Estate *> *);
37
void setEstateGroup(EstateGroup *group) { m_group = group; }
38
void setOwner(Player *_p) { m_owner = _p; }
39
void setIcon(const std::string &icon);
40
std::string icon() const;
41
void setRent(int _houses, int _m) { m_rent[_houses] = _m; }
42
void addMoney(int money);
43
void setPayAmount(int amount);
45
void setPayTarget(Estate *estate) { m_payTarget = estate; }
47
void setTakeCardGroup(CardGroup *cardGroup);
48
CardGroup *takeCardGroup();
50
EstateGroup *group() { return m_group; }
51
Player *owner() { return m_owner; }
52
const std::string color();
53
const std::string bgColor();
56
int rentByHouses(int _h) { return m_rent[_h]; }
57
int rent(Player *player, const std::string &rentMath);
58
Estate *payTarget() { return m_payTarget; }
61
bool canToggleMortgage(Player *owner);
62
bool canBuyHouses(Player *);
63
bool canSellHouses(Player *);
65
int groupSize(Player *);
68
bool groupHasBuildings();
69
bool groupHasMortgages();
70
bool estateGroupIsMonopoly();
76
CardGroup *m_takeCardGroup;
77
std::vector<Estate *> *m_estates;
81
#endif // MONOP_ESTATE_H