From 147e6bf141a72cc7238025541a3118f3ebc95643 Mon Sep 17 00:00:00 2001 From: avankineni <70177491+avankineni@users.noreply.github.com> Date: Tue, 28 Feb 2023 11:35:29 -0800 Subject: [PATCH 1/2] Update Dice.cpp --- Dice.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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; +} From b5b663d0283e12287206b009e1f6074623b68aad Mon Sep 17 00:00:00 2001 From: avankineni <70177491+avankineni@users.noreply.github.com> Date: Tue, 28 Feb 2023 11:36:06 -0800 Subject: [PATCH 2/2] Update Dice.h --- Dice.h | 1 + 1 file changed, 1 insertion(+) 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;