qnetdice

view src/roll.h @ 4:7d28bef3fbca

ops, forgot to add +1 to random numbers in roll.cc to make them 1-based
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 23 Dec 2013 17:40:34 +0200
parents
children
line source
1 #ifndef ROLL_H_
2 #define ROLL_H_
4 #include <string>
6 class Roll {
7 private:
8 int sides;
9 int value;
10 std::string name;
12 public:
13 explicit Roll(int sides = 20);
15 void set_name(const char *name);
16 void set_sides(int sides);
17 void set_value(int value);
19 const char *get_name() const;
20 int get_sides() const;
21 int get_value() const;
23 int roll();
24 };
26 #endif // ROLL_H_