-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSpaceHandler.h
More file actions
54 lines (41 loc) · 1.48 KB
/
Copy pathSpaceHandler.h
File metadata and controls
54 lines (41 loc) · 1.48 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma once
#include"Space.h"
#include"Player.h"
#include<string>
#include"Game.h"
class SpaceHandler {
public:
SpaceHandler(Game&, Player&, std::vector<Player>&, Space*);
void handle();
void handleJailSpace();
void handleTaxSpace();
void handleLuxuryTax();
void handleIncomeTax();
void handleIncomeTaxAI();
void handleIncomeTaxPlayer(int assets);
bool checkPlayerBankrupt(Player& player);
void handlePropertySpace(int cost);
void handleUnownedProperty(int cost);
void doBid(int cost);
void runBidCycle(std::vector<Player*>& bidders, int& currentBid, bool& doneBidding, int cost);
void askAIKeepBidding(int cost, int& currentBid, Player& bidder);
void askPlayerKeepBidding(int& currentBid, Player& bidder);
void setBidWinner(Player& bidder, int& currentBid, bool& doneBidding);
void askAIParticipateBid(Player& other, int currentBid, std::vector<Player*>& bidders);
void askPlayerParticipateBid(Player& other, int currentBid, std::vector<Player*>& bidders);
void askAIToPurchase(int cost, bool& biddable);
void askPlayerToPurchase(int cost, bool& biddable);
void handleOwnedProperty(int cost);
void handleOwnedByAnother(int cost);
void ownedByAnotherAIChoice(int rent);
void ownedByAnotherPlrChoice(int cost, int rent, Player* owner);
void attackProperty();
void payRent(int rent, Player* owner);
int getRent(Player* owner, std::vector<Space*> spaces);
void checkForABattle();
private:
Game& game;
Player& curPlayer;
std::vector<Player>& curPlayers;
Space* curSpace;
};