From 30420a6ea65aa58389b9ffa0ba67130de376c079 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 6 Apr 2022 10:29:54 +0300 Subject: Implemented overall functionality for yesterdays practice exercise --- .../07-Practice-05.04.2022/GameCase.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Year 1/Object-oriented Programming/07-Practice-05.04.2022/GameCase.cpp') diff --git a/Year 1/Object-oriented Programming/07-Practice-05.04.2022/GameCase.cpp b/Year 1/Object-oriented Programming/07-Practice-05.04.2022/GameCase.cpp index 713c94c..f16e72b 100644 --- a/Year 1/Object-oriented Programming/07-Practice-05.04.2022/GameCase.cpp +++ b/Year 1/Object-oriented Programming/07-Practice-05.04.2022/GameCase.cpp @@ -3,11 +3,15 @@ GameCase::GameCase() : GameCase('\0', nullptr) {} -GameCase::GameCase(char command, bool func(const Player&, double&)) { +GameCase::GameCase(char command, bool func(double&)) { this->command = command; this->func = func; } -bool GameCase::exec(const Player& player, double& bet) const { - return this->func(player, bet); +char GameCase::get_comm() const { + return this->command; +} + +bool GameCase::exec(double& bet) const { + return this->func(bet); } -- cgit v1.3.1-23-gd82d