-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.hpp
47 lines (42 loc) · 1.12 KB
/
Game.hpp
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
#pragma once
#include "skills.h"
#include "Attacker.hpp"
#include "Defender.hpp"
#include "GoalKeeper.hpp"
// Change your team color here (BLUE_TEAM/YELLOW_TEAM)face
Simulator::TeamColor teamColor = Simulator::YELLOW_TEAM;
// Make usingDebugger is false when playing against an opponent
bool usingDebugger = true;
namespace MyStrategy
{
// Write your strategy here in game function.
// You can also make new functions and call them from game function.
void game(BeliefState *state)
{
/*
int x = state->ballPos.x;
int y = state->ballPos.y;
if (x <= HALF_FIELD_MAXX * 2 / 5.0 && x >= -HALF_FIELD_MAXX / 5.0)
{
attacker(state, 2);
defender(state, 1);
goalkeeper(state, 0);
}
else if (x > HALF_FIELD_MAXX * 2 / 5)
{
attacker(state, state->ourBotNearestToBall);
attacker(state, 3 - state->ourBotNearestToBall);
goalkeeper(state, 0);
}
else if (x < -HALF_FIELD_MAXX * 1 / 5)
{
defender(state, 1);
defender(state, 2);
goalkeeper(state, 0);
}
*/
attacker(state, 2);
defender(state, 1);
goalkeeper(state, 0);
}
}