-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.h
79 lines (66 loc) · 2.46 KB
/
commands.h
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef COMMANDS_H
#define COMMANDS_H
#include <stdexcept>
#include <string>
#include <iostream>
#include <memory>
#include "board.h"
#include "player.h"
#include "ownable.h"
#include "Unownable.h"
#include "dice.h"
#include "transactions.h"
#include "auction.h"
#include "MonetaryServices.h"
#include "SLC.h"
#include "positionMap.h"
class Board;
class Player;
class Ownable;
class Unownable;
class Dice;
class Transactions;
class Auction;
class SLC;
class MonetaryServices;
bool isNumber(std::string a);
void followWhenInsufficientFunds(std::vector<std::shared_ptr<Player>> group,
std::shared_ptr<Player> curPlayer, std::shared_ptr<Board> b,
std::shared_ptr<Player> propOwner, bool payBank);
void followRollCommand(std::vector<std::shared_ptr<Player>> group,
std::shared_ptr<Player> curPlayer, bool testMode,
std::shared_ptr<Board> b);
void followTradeCommand(std::vector<std::shared_ptr<Player>> group,
std::shared_ptr<Player> curPlayer);
void followImproveCommand(std::vector<std::shared_ptr<Player>> group,
std::shared_ptr<Player> curPlayer, std::shared_ptr<Board> b);
void followMortgageCommand(std::shared_ptr<Player> curPlayer);
void followUnmortgageCommand(std::shared_ptr<Player> curPlayer);
void followBankruptCommandWithPlayer(std::shared_ptr<Player> curPlayer,
std::shared_ptr<Player> toPlayer);
void followBankruptCommandWithBank(std::shared_ptr<Player> curPlayer);
void followAssetsCommand(std::shared_ptr<Player> curPlayer);
void followAllCommand(std::vector<std::shared_ptr<Player>> group);
void followAuctionCommand(std::vector<std::shared_ptr<Player>> group,
std::shared_ptr<Player> curPlayer, std::string ownableItem);
// basic command (such as roll, next,...) and action (such as buy, sell)
const std::string ROLL = "roll";
const std::string NEXT = "next";
const std::string TRADE = "trade";
const std::string IMPROVE = "improve";
const std::string BUY = "buy";
const std::string SELL = "sell";
const std::string MORTGAGE = "mortgage";
const std::string UNMORTGAGE = "unmortgage";
const std::string BANKRUPT = "bankrupt";
const std::string ASSETS = "assets";
const std::string ALL = "all";
const std::string SAVE = "save";
const std::string LOAD = "-load";
const std::string TESTING = "-testing";
const std::string QUIT = "quit";
// helper command
const std::string AUCTION = "auction"; // to call auction command
const std::string RAISE = "raise"; // place a bid in the auction command
const std::string WITHDRAW = "withdraw"; // withdraw from a bid
#endif