| 1 |
// Copyright © 2001-2003 Rob Kaper <[email protected]>, |
| 2 |
// 2001 Erik Bourget <[email protected]> |
| 3 |
// 2010-2015 Sylvain Rochet <[email protected]> |
| 4 |
// |
| 5 |
// This program is free software; you can redistribute it and/or |
| 6 |
// modify it under the terms of the GNU General Public License |
| 7 |
// version 2 as published by the Free Software Foundation. |
| 8 |
// |
| 9 |
// This program is distributed in the hope that it will be useful, |
| 10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
// General Public License for more details. |
| 13 |
// |
| 14 |
// You should have received a copy of the GNU General Public License |
| 15 |
// along with this program; see the file COPYING. If not, see |
| 16 |
// <http://www.gnu.org/licenses/>. |
| 17 |
|
| 18 |
#ifndef MONOP_CARD_H |
| 19 |
#define MONOP_CARD_H |
| 20 |
|
| 21 |
#include <string> |
| 22 |
|
| 23 |
#include "gameobject.h" |
| 24 |
|
| 25 |
class CardGroup; |
| 26 |
class EstateGroup; |
| 27 |
class Player; |
| 28 |
|
| 29 |
class Card : public GameObject |
| 30 |
{ |
| 31 |
public: |
| 32 |
Card(CardGroup *cardGroup, int id); |
| 33 |
|
| 34 |
void setOwner(Player *owner) { m_owner = owner; } |
| 35 |
Player *owner() { return m_owner; } |
| 36 |
|
| 37 |
void setCanBeOwned (bool canBeOwned) { m_canBeOwned = canBeOwned; } |
| 38 |
bool canBeOwned() { return m_canBeOwned; } |
| 39 |
void setPay(int _pay) { m_pay = _pay; } |
| 40 |
void setPayHouse(int _pay) { m_payHouse = _pay; } |
| 41 |
void setPayHotel(int _pay) { m_payHotel = _pay; } |
| 42 |
void setPayEach(int _pay) { m_payEach = _pay; } |
| 43 |
void setAdvance(int _a) { m_advance = _a; } |
| 44 |
void setAdvanceTo(int _a) { m_advanceTo = _a; } |
| 45 |
void setAdvanceToNextOf(EstateGroup *group) { m_advanceToNextOf = group; } |
| 46 |
void setToJail(bool _j) { m_toJail = _j; } |
| 47 |
void setOutOfJail(bool outOfJail) { m_outOfJail = outOfJail; } |
| 48 |
void setRentMath(std::string rentMath) { m_rentMath = rentMath; } |
| 49 |
std::string rentMath() { return m_rentMath; } |
| 50 |
|
| 51 |
int pay() { return m_pay; } |
| 52 |
int payHouse() { return m_payHouse; } |
| 53 |
int payHotel() { return m_payHotel; } |
| 54 |
int payEach() { return m_payEach; } |
| 55 |
int advance() { return m_advance; } |
| 56 |
int advanceTo() { return m_advanceTo; } |
| 57 |
EstateGroup *advanceToNextOf() { return m_advanceToNextOf; } |
| 58 |
bool toJail() { return m_toJail; } |
| 59 |
bool outOfJail() { return m_outOfJail; } |
| 60 |
CardGroup *group() { return m_group; } |
| 61 |
|
| 62 |
private: |
| 63 |
Player *m_owner; |
| 64 |
CardGroup *m_group; |
| 65 |
EstateGroup *m_advanceToNextOf; |
| 66 |
int m_pay, m_payHouse, m_payHotel, m_payEach, m_advance, m_advanceTo; |
| 67 |
std::string m_rentMath; |
| 68 |
bool m_canBeOwned, m_toJail, m_outOfJail; |
| 69 |
}; |
| 70 |
|
| 71 |
#endif // MONOP_CARD_H |