From d65fbbd2556105fefebf4124918f5f5abeb1bdd3 Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Tue, 16 Apr 2019 15:32:57 -0500 Subject: AHHHHHHH --- ee1301/wk6/hw6_directory/dice.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'ee1301/wk6/hw6_directory/dice.cpp') diff --git a/ee1301/wk6/hw6_directory/dice.cpp b/ee1301/wk6/hw6_directory/dice.cpp index 7adefe5..8b41c0a 100644 --- a/ee1301/wk6/hw6_directory/dice.cpp +++ b/ee1301/wk6/hw6_directory/dice.cpp @@ -14,19 +14,22 @@ class Dice { private: int min; int max; - public: -// void roll(); + int roll(int min, int max); + void setMin(); int getMin(); + void setMax(); int getMax(); + Dice(); + Dice(int min, int max); }; -int main() -{ - srand(time(NULL)); // DO NOT WRITE THIS LINE AGAIN OR ANYWHERE ELSE +int main() { + int rounds; + Dice die[50]; + srand(time(0)); // DO NOT WRITE THIS LINE AGAIN OR ANYWHERE ELSE cout << "What do you want to roll? "; string s; getline(cin, s); - cin.ignore(); - cout << "How many rounds do you want to roll?"; + cout << "How many rounds do you want to roll? "; cin >> rounds; int* pairs = userInputParser(s); @@ -42,6 +45,8 @@ int main() for(int i=1; i < pairs[0]; i+=2) { cout << "["<