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:
Commit30420a6ea65aa58389b9ffa0ba67130de376c079 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-04-06 10:29:54 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-04-06 10:29:54 +0300
Files12981a8607166b51b9dbbee5ab8e1d965bff509b /Year 1/Object-oriented Programming/07-Practice-05.04.2022/GameCase.cpp
uni-projects-30420a6ea65aa58389b9ffa0ba67130de376c079.tar
uni-projects-30420a6ea65aa58389b9ffa0ba67130de376c079.tar.gz
uni-projects-30420a6ea65aa58389b9ffa0ba67130de376c079.zip
Parent2cf8d711c3dd110555c16913941f865841aa3175 (diff)
Implemented overall functionality for yesterdays practice exercise
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);
}