Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / 07-Practice-05.04.2022 / GameCase.h
blob: 722b57a0efff3b15f5e25667d088a5cbdf5a86f7 (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
#ifndef GAMECASE_HEADER
#define GAMECASE_HEADER

#include <iostream>
#include <cstring>
#include "Player.h"

class GameCase {
	char command;
	char* description;
	bool (*func)(double&);

	void copyFrom(const GameCase&);
	void free();
public:
	GameCase();
	GameCase(char, const char*, bool f(double&));

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

	char get_comm() const;
	void print() const;

	bool exec(double&) const;
};

#endif