| 1 |
// Copyright © 2002 Rob Kaper <[email protected]> |
| 2 |
// 2010-2015 Sylvain Rochet <[email protected]> |
| 3 |
// |
| 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. |
| 7 |
// |
| 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. |
| 12 |
// |
| 13 |
// You should have received a copy of the GNU General Public License |
| 14 |
// along with this program; see the file COPYING. If not, see |
| 15 |
// <http://www.gnu.org/licenses/>. |
| 16 |
|
| 17 |
#ifndef MONOP_TRADECOMPONENT_H |
| 18 |
#define MONOP_TRADECOMPONENT_H |
| 19 |
|
| 20 |
#include <vector> |
| 21 |
|
| 22 |
class GameObject; |
| 23 |
class Player; |
| 24 |
|
| 25 |
class TradeComponent |
| 26 |
{ |
| 27 |
public: |
| 28 |
TradeComponent(Player *from, Player *to, GameObject *gameObject); |
| 29 |
TradeComponent(Player *from, Player *to, unsigned int money); |
| 30 |
|
| 31 |
void updateTargetPlayer(Player *to); |
| 32 |
void updateMoney(unsigned int); |
| 33 |
|
| 34 |
void setObject(GameObject *object) { m_object = object; } |
| 35 |
GameObject *object() { return m_object; } |
| 36 |
Player *from() { return m_playerFrom; } |
| 37 |
Player *targetPlayer() { return m_playerTo; } |
| 38 |
unsigned int money() { return m_money; } |
| 39 |
|
| 40 |
private: |
| 41 |
Player *m_playerFrom, *m_playerTo; |
| 42 |
unsigned int m_money; |
| 43 |
GameObject *m_object; |
| 44 |
}; |
| 45 |
|
| 46 |
#endif // MONOP_TRADECOMPONENT_H |