-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer.h
More file actions
30 lines (25 loc) · 712 Bytes
/
Player.h
File metadata and controls
30 lines (25 loc) · 712 Bytes
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
#ifndef PLAYER
#define PLAYER
#include <iostream>
#include <string>
#include <sstream>
#include "Dice.h"
#include "ScoreSheet.h"
class Player
{
protected:
bool d_active = false;
ScoreSheet *d_ScoreSheet;
std::vector<Color> get_color_index_vect(std::istream& _in) const;
Color convert_to_color(const std::string _str) const;
virtual int convert_to_index(const Color _color) const = 0;
public:
Player(ScoreSheet *_ss);
virtual ~Player() = default;
virtual RollOfDice inputBeforeRoll(RollOfDice& _roll) = 0;
virtual void inputAfterRoll(const RollOfDice& _roll) = 0;
bool operator!() const;
int printScoreSheet() const;
std::string getName() const;
};
#endif