Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / 07-Practice-05.04.2022 / GameCase.cpp
diff options
context:
space:
mode:
1 files changed, 7 insertions, 3 deletions
-rw-r--r--Year 1/Object-oriented Programming/07-Practice-05.04.2022/GameCase.cpp10
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);
}