Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / 07-Practice-05.04.2022 / Game.h
blob: 891519615cc09ef1aaf23f216da55599a6e20859 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#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 copyFrom(const Game&);
	void free();

	TurnResult turn(double&);
public:
	Game(const GameCase*, unsigned);

	Game(const Game&);
	Game& operator=(const Game&);
	~Game();

	void play(Player&);
};