-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBrain.h
More file actions
executable file
·78 lines (65 loc) · 1.57 KB
/
Brain.h
File metadata and controls
executable file
·78 lines (65 loc) · 1.57 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//******************************************************************
// Brain 类 ( Server 0.6 )
// By: Leo 2008-9-10
//
// Agent 的决策类
//
//******************************************************************
#ifndef __BRAIN_H__
#define __BRAIN_H__
#include "ConfFileRead.h"
#include "EnumType.h"
#include "WorldModel.h"
#include "Situation.h"
#include "Formation.h"
#include "CommandQuene.h"
#include "Motion.h"
#include "Vision.h"
#include "coach.h"
#include "Logger.h"
#include "Say.h"
class Brain
{
public:
Brain( WorldModel *wm, CommandQuene *cmdQuene );
~Brain();
private:
WorldModel *mWorldModel;
CommandQuene *mCmdQuene;
Situation *mSituation;
Vision *mVision;
Motion *mMotion;
Formation *mFormation;
Coach *mCoach;
Say *mSay;
public:
void MainThink(); // Main决策函数
public:
void ThinkBeam();
void ThinkBeamInitial();
private:
bool mBrainTest;
void InitBrain();
bool ThinkPrepare();
void ThinkTest();
void ThinkSwingHead();
void ThinkHear_Say();
private:
void ThinkNormal(); // 普通队员(非守门员)决策函数
void ThinkNormalAttack( BasicStrategy basicStrategy );
void ThinkNormalDefense( BasicStrategy basicStrategy );
void ThinkInitialStrategy();
private:
void ThinkGoalie(); // 守门员决策函数
void ThinkKickOffBall();
void ThinkDefendPos();
void ThinkClearBall();
void ThinkDefendSuper();
void ThinkDefendBall();
void ThinkGoalKick();
void ThinkGoalieOther();
private:
bool IsActionDone();
void Do();
};
#endif //__BRAIN_H__