diff options
Implemented overall functionality for yesterdays practice exercise
1 files changed, 13 insertions, 1 deletions
| -rw-r--r-- | Year 1/Object-oriented Programming/07-Practice-05.04.2022/Game.h | 14 |
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); |
