-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBrainGoalie.cpp
More file actions
executable file
·69 lines (64 loc) · 1.4 KB
/
BrainGoalie.cpp
File metadata and controls
executable file
·69 lines (64 loc) · 1.4 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
#include "Brain.h"
#define B_GoalieLog gLog<< "[goalie] "
static float PlayerHeight = 0.58f;
void Brain::ThinkGoalie()
{
B_GoalieLog << "ThinkGoalie" << endl;
GoalieState goalieState = mSituation->GetGoalieState();
switch (goalieState)
{
case GoaS_DefendPos:
ThinkDefendPos();
break;
case GoaS_ClearBall:
ThinkClearBall();
break;
case GoaS_DefendBall:
ThinkDefendBall();
break;
case GoaS_DefendSuper:
ThinkDefendSuper();
break;
case GoaS_GoalKick:
ThinkGoalKick();
break;
case GoaS_Other:
ThinkGoalieOther();
break;
}
}
void Brain::ThinkKickOffBall()
{
B_GoalieLog << "Kick off Ball" << endl;
mMotion->DoMotion(MT_GoalieKickOffBall);
}
void Brain::ThinkClearBall()
{
B_GoalieLog << "clear Ball" << endl;
mMotion->DoMotion(MT_GoalieClearBall);
}
void Brain::ThinkDefendPos()
{
B_GoalieLog << "Defend pos" << endl;
mMotion->DoMotion(MT_GoalieDefendPos);
}
void Brain::ThinkDefendBall()
{
B_GoalieLog << "Defend ball" << endl;
mMotion->DoMotion(MT_GoalieDefendBall);
}
void Brain::ThinkDefendSuper()
{
B_GoalieLog << "Defend super" << endl;
mMotion->DoMotion(MT_GoalieDefendSuper);
}
void Brain::ThinkGoalieOther()
{
B_GoalieLog << "Defend Stand still" << endl;
mMotion->DoMotion(MT_Stand/*MT_GoalieOther*/);
}
void Brain::ThinkGoalKick()
{
B_GoalieLog << "Goal kick: Shoot" << endl;
mMotion->DoMotion(MT_Shoot);
}