-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCLI.h
41 lines (41 loc) · 940 Bytes
/
CLI.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
#include "Board.h"
#include "Player.h"
#include <algorithm>
// Class to render the game on the command line
class CLI
{
public:
enum cli_choice
{
BUY,
SELL,
ROLL,
UPGRADE,
PLAY,
BATTLE,
EXIT,
CONTINUE,
INVALID
};
struct cli_input
{
enum cli_choice choice;
int card;
};
// Refresh the terminal
void clear();
// Draw the player and bot cards on the board
void drawBoard(const Board &board, const Player &player, const Player &bot);
// Convert the card to a string
std::string cardToString(const Card &card);
// Draw a card
void drawCards(std::vector<std::reference_wrapper<Card>> &cards);
// Draw the shop cards choices for the player
void drawChoices(const Player& player);
// Draw the hand of the player
void drawHand(const Player& player);
// Get the input from the Player
cli_input getInput(const Player& player);
// Draw players stats
void drawStats(const Player& player);
};