Debian Codegraph @

src/auction.h

raw
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_AUCTION_H
19 #define MONOP_AUCTION_H
20
21 #include "gameobject.h"
22
23 class Estate;
24 class Player;
25
26 class Auction : public GameObject
27 {
28 public:
29 enum Status { Bidding = 0, GoingOnce = 1, GoingTwice = 2, Sold = 3 };
30
31 Auction();
32 void setEstate(Estate *estate) { m_estate = estate; }
33 void setHighBid(Player *player, unsigned int bid);
34
35 void setStatus(unsigned int status) { m_status = status; }
36 unsigned int status() { return m_status; }
37 Player *highBidder() { return m_highBidder; }
38 Estate *estate() { return m_estate; }
39
40 private:
41 Player *m_highBidder;
42 Estate *m_estate;
43 unsigned int m_status;
44 };
45
46 #endif