blob: 09e383f4a774f76a40af487ec7b5029a2f6b69cc (
plain)
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
|
#ifndef _AI_CONTROLLER_H
#define _AI_CONTROLLER_H
#include "Controller.h"
#ifndef max
#define max( a, b ) ( ((a) > (b)) ? (a) : (b) )
#endif
#ifndef min
#define min( a, b ) ( ((a) < (b)) ? (a) : (b) )
#endif
class AIController : public Controller
{
public:
AIController(Player& player, Field& field, int inhibitDelay, int randomThreshold);
virtual ~AIController(void);
void think();
void reset();
private:
void turnRandom();
Field& m_field;
int m_inhibit;
int m_inhibitDelay;
int m_randomThreshold;
};
#endif
|