Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / 06-Practice-05.04.2022 / Game.cpp
diff options
context:
space:
mode:
Commit2cf8d711c3dd110555c16913941f865841aa3175 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-04-06 08:40:07 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-04-06 08:40:07 +0300
Filesf9822151e8c05911cc6919e7a8a9c4daee1e929a /Year 1/Object-oriented Programming/06-Practice-05.04.2022/Game.cpp
uni-projects-2cf8d711c3dd110555c16913941f865841aa3175.tar
uni-projects-2cf8d711c3dd110555c16913941f865841aa3175.tar.gz
uni-projects-2cf8d711c3dd110555c16913941f865841aa3175.zip
Parente9f62e28a4de3f9051da9b437bd6130328de2d90 (diff)
Fixed folder naming from yesterdays oop practice
1 files changed, 0 insertions, 37 deletions
-rw-r--r--Year 1/Object-oriented Programming/06-Practice-05.04.2022/Game.cpp37
diff --git a/Year 1/Object-oriented Programming/06-Practice-05.04.2022/Game.cpp b/Year 1/Object-oriented Programming/06-Practice-05.04.2022/Game.cpp
deleted file mode 100644
index ae5fcc0..0000000
--- a/Year 1/Object-oriented Programming/06-Practice-05.04.2022/Game.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#include "Game.h"
-
-/* Private */
-
-void Game::turn(Player& player, double& bet) {
- std::cout << "Enter command: ";
- char buffer;
- std::cin >> buffer;
-
- bool result = false;
- for (int i = 0; i < this->caseCount; i++) {
- if (cases[i].get_comm() == buffer) {
- result = cases[i].exec(player, bet);
- break;
- }
- }
-
- if (result) {
- std::cout << "You win!";
- player.addToBalance("", bet);
- }
- else {
- std::cout << "You lost!";
- player.deductFromBalance("", bet);
- }
- std::cout << " Current balance: " << player.get_balance() << std::endl;
-}
-
-/* Public */
-
-Game::Game(const GameCase* cases, unsigned casesCount) {
- this->cases = new GameCase[casesCount];
- for (int i = 0; i < casesCount; i++)
- this->cases[i] = cases[i];
-}
-
-