-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDiceRoller.h
34 lines (31 loc) · 914 Bytes
/
DiceRoller.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
//
// Created by mfbut on 1/23/2018.
//
#ifndef HOARDINGCPPVERSION_DICEROLLER_H
#define HOARDINGCPPVERSION_DICEROLLER_H
#include <fstream>
#include <string>
#include <vector>
namespace Monopoly {
class DiceRoller {
public:
explicit DiceRoller(const std::string& file_name,
const int num_dice_rolled = 2,
const int min_die_value = 1,
const int max_die_value = 6);
int getDiceRoll(int numDiceToRoll);
int getDiceRoll();
bool multiplesRolled() const;
private:
std::ifstream file;
int num_dice_rolled;
int min_die_value;
int max_die_value;
std::vector<int> prev_die_rolls;
int numConsecutiveMultiplesRolled;
public:
int getNumConsecutiveMultiplesRolled() const;
void setNumConsecutiveMultiplesRolled(int numConsecutiveMultiplesRolled);
};
}
#endif //HOARDINGCPPVERSION_DICEROLLER_H