From e9f62e28a4de3f9051da9b437bd6130328de2d90 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 5 Apr 2022 21:32:06 +0300 Subject: Added todays oop practice work --- .../06-Practice-05.04.2022/GameCase.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Year 1/Object-oriented Programming/06-Practice-05.04.2022/GameCase.cpp (limited to 'Year 1/Object-oriented Programming/06-Practice-05.04.2022/GameCase.cpp') diff --git a/Year 1/Object-oriented Programming/06-Practice-05.04.2022/GameCase.cpp b/Year 1/Object-oriented Programming/06-Practice-05.04.2022/GameCase.cpp new file mode 100644 index 0000000..713c94c --- /dev/null +++ b/Year 1/Object-oriented Programming/06-Practice-05.04.2022/GameCase.cpp @@ -0,0 +1,13 @@ +#include "GameCase.h" + +GameCase::GameCase() : GameCase('\0', nullptr) +{} + +GameCase::GameCase(char command, bool func(const Player&, double&)) { + this->command = command; + this->func = func; +} + +bool GameCase::exec(const Player& player, double& bet) const { + return this->func(player, bet); +} -- cgit v1.3.1-23-gd82d