qnetdice
diff src/roll.h @ 1:92377189a5c6
moving along
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 22 Dec 2013 04:08:50 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/roll.h Sun Dec 22 04:08:50 2013 +0200 1.3 @@ -0,0 +1,26 @@ 1.4 +#ifndef ROLL_H_ 1.5 +#define ROLL_H_ 1.6 + 1.7 +#include <string> 1.8 + 1.9 +class Roll { 1.10 +private: 1.11 + int sides; 1.12 + int value; 1.13 + std::string name; 1.14 + 1.15 +public: 1.16 + explicit Roll(int sides = 20); 1.17 + 1.18 + void set_name(const char *name); 1.19 + void set_sides(int sides); 1.20 + void set_value(int value); 1.21 + 1.22 + const char *get_name() const; 1.23 + int get_sides() const; 1.24 + int get_value() const; 1.25 + 1.26 + int roll(); 1.27 +}; 1.28 + 1.29 +#endif // ROLL_H_