Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / 07-Practice-05.04.2022 / Game.h
diff options
context:
space:
mode:
1 files changed, 13 insertions, 1 deletions
-rw-r--r--Year 1/Object-oriented Programming/07-Practice-05.04.2022/Game.h14
diff --git a/Year 1/Object-oriented Programming/07-Practice-05.04.2022/Game.h b/Year 1/Object-oriented Programming/07-Practice-05.04.2022/Game.h
index 96feeaf..8915196 100644
--- a/Year 1/Object-oriented Programming/07-Practice-05.04.2022/Game.h
+++ b/Year 1/Object-oriented Programming/07-Practice-05.04.2022/Game.h
@@ -1,13 +1,25 @@
#include <iostream>
+#include <stdlib.h> // srand, time and rand
#include "Player.h"
#include "GameCase.h"
+double getRandomBetween(int, int);
+
+enum TurnResult {
+ Quit,
+ Continue,
+ Win,
+ Lost
+};
+
class Game {
GameCase* cases;
unsigned caseCount;
- void turn(Player&, double&);
+ void copyFrom(const Game&);
+ void free();
+ TurnResult turn(double&);
public:
Game(const GameCase*, unsigned);