-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplayer_ai.h
52 lines (38 loc) · 888 Bytes
/
player_ai.h
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef PLAYER_AI_H
#define PLAYER_AI_H
#include "./player_ai.h"
#include <functional>
#include "./grid.h"
class PlayerAI : public Player {
private:
/**
* Pointer to the grid.
*/
Grid *grid;
/**
* Callback to be called when turn has finished.
*/
std::function<void(void)> onFinishTurnCallback;
/**
* Random seed.
*/
unsigned int seed;
/**
* Iterator used to check units.
*/
unsigned long int unitNumber;
public:
/**
* Creates a new AI player.
*/
explicit PlayerAI(Grid *grid, std::function<void(void)> callback);
/**
* Creates a new AI player given its ID.
*/
explicit PlayerAI(Grid *grid, std::function<void(void)> callback,
PlayerID ID);
virtual void startTurn();
virtual void print();
virtual ~PlayerAI() = default;
};
#endif