diff --git a/Dice.cpp b/Dice.cpp index a81a3c3..152462a 100644 --- a/Dice.cpp +++ b/Dice.cpp @@ -44,3 +44,12 @@ int Dice::roll() vector Dice::get_distribution(){ return roll_counter; } +vector Dice::get_percentage() +{ + vector percentage; + for(int i = 0; i < FACES; i++) + { + percentage.push_back(roll_counter[i]); + } + return percentage; +} diff --git a/Dice.h b/Dice.h index d2f764b..1289eab 100644 --- a/Dice.h +++ b/Dice.h @@ -11,6 +11,7 @@ class Dice Dice(unsigned int); int roll(); vector get_distribution(); + vector get_percentage(); private: vector roll_counter;