Phoenix2D-Library  0.10
Self.h
Go to the documentation of this file.
1 /*
2  * Phoenix2D (RoboCup Soccer Simulation 2D League)
3  * Copyright (c) 2013 Ivan Gonzalez
4  *
5  * This file is part of Phoenix2D.
6  *
7  * Phoenix2D is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * Phoenix2D is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with Phoenix2D. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef SELF_H_
22 #define SELF_H_
23 
24 #include <string>
25 #include <list>
26 #include <vector>
27 #include "Flag.h"
28 #include "Position.h"
29 #include "Vector2D.h"
30 
34 namespace Phoenix
35 {
36 
37 class Command;
45 class Self {
46 public:
47  static double PI;
48  static std::string TEAM_NAME;
49  static int UNIFORM_NUMBER;
50  static std::string SIDE;
56  static double EFFORT_MAX_DELTA_FACTOR;
57  static double EFFORT_MIN_DELTA_FACTOR;
58  static double EXTRA_STAMINA_DELTA_MAX;
59  static double EXTRA_STAMINA_DELTA_MIN;
64  static double KICK_RAND_DELTA_FACTOR;
70  static double PLAYER_DECAY_DELTA_MAX;
71  static double PLAYER_DECAY_DELTA_MIN;
72  static double PLAYER_SIZE_DELTA_FACTOR;
75  static int PLAYER_TYPES;
76  static int PT_MAX;
77  static int RANDOM_SEED;
79  static int SUBS_MAX;
80  static int TYPE_ID;
81  static double PLAYER_SPEED_MAX;
82  static double STAMINA_INC_MAX;
83  static double PLAYER_DECAY;
84  static double INERTIA_MOMENT;
85  static double DASH_POWER_RATE;
86  static double PLAYER_SIZE;
87  static double KICKABLE_MARGIN;
88  static double KICK_RAND;
89  static double EXTRA_STAMINA;
90  static double EFFORT_MAX;
91  static double EFFORT_MIN;
92  static double KICK_POWER_RATE;
93  static double FOUL_DETECT_PROBABILITY;
94  static double CATCHABLE_AREA_L_STRETCH;
95  static std::string VIEW_MODE_WIDTH;
96  static std::string getViewModeWidthAtTime(unsigned int time);
97  static std::string VIEW_MODE_QUALITY;
98  static std::string getViewModeQualityAtTime(unsigned int time);
99  static double STAMINA;
100  static double getStaminaAtTime(unsigned int time);
101  static double EFFORT;
102  static double getEffortAtTime(unsigned int time);
103  static double STAMINA_CAPACITY;
104  static double getStaminaCapacityAtTime(unsigned int time);
105  static double AMOUNT_OF_SPEED;
106  static double getAmountOfSpeedAtTime(unsigned int time);
107  static double DIRECTION_OF_SPEED;
108  static double getDirectionOfSpeedAtTime(unsigned int time);
109  static double HEAD_ANGLE;
110  static double getHeadAngleAtTime(unsigned int time);
111  static int KICK_COUNT;
112  static int getKickCountAtTime(unsigned int time);
113  static int DASH_COUNT;
114  static int getDashCountAtTime(unsigned int time);
115  static int TURN_COUNT;
116  static int getTurnCountAtTime(unsigned int time);
117  static int SAY_COUNT;
118  static int getSayCountAtTime(unsigned int time);
119  static int TURN_NECK_COUNT;
120  static int getTurnNeckCountAtTime(unsigned int time);
121  static int CATCH_COUNT;
122  static int getCatchCountAtTime(unsigned int time);
123  static int MOVE_COUNT;
124  static int getMoveCountAtTime(unsigned int time);
125  static int CHANGE_VIEW_COUNT;
126  static int getChangeViewCountAtTime(unsigned int time);
127  static int ARM_MOVABLE;
128  static int getArmMovableAtTime(unsigned int time);
129  static int ARM_EXPIRES;
130  static int getArmExpiresAtTime(unsigned int time);
131  static double ARM_DIST;
132  static double getArmDistAtTime(unsigned int time);
133  static double ARM_DIR;
134  static double getArmDirAtTime(unsigned int time);
135  static int ARM_COUNT;
136  static int getArmCountAtTime(unsigned int time);
137  static std::string FOCUS_TARGET;
138  static std::string getFocusTargetAtTime(unsigned int time);
139  static int FOCUS_COUNT;
140  static int getFocusCountAtTime(unsigned int time);
141  static int TACKLE_EXPIRES;
142  static int getTackleExpiresAtTime(unsigned int time);
143  static int TACKLE_COUNT;
144  static int getTackleCountAtTime(unsigned int time);
145  static std::list<std::string> COLLISION;
146  static std::list<std::string> getCollisionsAtTime(unsigned int time);
147  static int FOUL_CHARGED;
148  static int getFoulChargedAtTime(unsigned int time);
149  static std::string FOUL_CARD;
150  static std::string getFoulCardAtTime(unsigned int time);
151  Self(std::string player_params, std::string team_name, int unum, std::string side);
152  ~Self();
153  void addPlayerType(std::string player_type);
154  void processSenseBody(std::string sense_body);
155  void changePlayerType(int type);
156  void localize(std::vector<Flag> flags);
157  void localize();
158  static Position getPosition();
159  static Vector2D getVelocity();
160  static void setLastCommandsSet(std::list<Command*> last_commands_sent);
161 };
163 } // End namespace Phoenix
166 #endif /* SELF_H_ */
static double getArmDistAtTime(unsigned int time)
Definition: Self.cpp:794
static int MOVE_COUNT
Definition: Self.h:123
static int UNIFORM_NUMBER
Definition: Self.h:49
Self(std::string player_params, std::string team_name, int unum, std::string side)
Definition: Self.cpp:225
static double NEW_DASH_POWER_RATE_DELTA_MAX
Definition: Self.h:67
void changePlayerType(int type)
Definition: Self.cpp:505
static double getStaminaCapacityAtTime(unsigned int time)
Definition: Self.cpp:742
static int CATCH_COUNT
Definition: Self.h:121
static double DASH_POWER_RATE
Definition: Self.h:85
static double PLAYER_DECAY
Definition: Self.h:83
void addPlayerType(std::string player_type)
Definition: Self.cpp:298
static double PLAYER_DECAY_DELTA_MIN
Definition: Self.h:71
void localize()
Definition: Self.cpp:696
static double getEffortAtTime(unsigned int time)
Definition: Self.cpp:738
static std::string VIEW_MODE_QUALITY
Definition: Self.h:97
static int TACKLE_COUNT
Definition: Self.h:143
static int FOCUS_COUNT
Definition: Self.h:139
Position The Position lorem Ipsum
Definition: Position.h:50
static double PI
Definition: Self.h:47
static double EXTRA_STAMINA_DELTA_MIN
Definition: Self.h:59
static int getArmMovableAtTime(unsigned int time)
Definition: Self.cpp:786
static double DASH_POWER_RATE_DELTA_MAX
Definition: Self.h:54
static int getTurnCountAtTime(unsigned int time)
Definition: Self.cpp:762
static std::list< std::string > getCollisionsAtTime(unsigned int time)
Definition: Self.cpp:822
static double getArmDirAtTime(unsigned int time)
Definition: Self.cpp:798
static Vector2D getVelocity()
Definition: Self.cpp:718
static Position getPosition()
Definition: Self.cpp:714
static double STAMINA_INC_MAX_DELTA_FACTOR
Definition: Self.h:78
static int getFoulChargedAtTime(unsigned int time)
Definition: Self.cpp:826
static double KICK_POWER_RATE_DELTA_MAX
Definition: Self.h:62
static int getArmExpiresAtTime(unsigned int time)
Definition: Self.cpp:790
static double KICKABLE_MARGIN
Definition: Self.h:87
static double KICKABLE_MARGIN_DELTA_MIN
Definition: Self.h:66
static double NEW_STAMINA_INC_MAX_DELTA_FACTOR
Definition: Self.h:69
static double PLAYER_SIZE_DELTA_FACTOR
Definition: Self.h:72
static double KICK_RAND
Definition: Self.h:88
static int PLAYER_TYPES
Definition: Self.h:75
static int DASH_COUNT
Definition: Self.h:113
static int getChangeViewCountAtTime(unsigned int time)
Definition: Self.cpp:782
static double KICK_RAND_DELTA_FACTOR
Definition: Self.h:64
static double KICKABLE_MARGIN_DELTA_MAX
Definition: Self.h:65
static double STAMINA
Definition: Self.h:99
static double FOUL_DETECT_PROBABILITY
Definition: Self.h:93
static double getStaminaAtTime(unsigned int time)
Definition: Self.cpp:734
static int TURN_NECK_COUNT
Definition: Self.h:119
static double EXTRA_STAMINA_DELTA_MAX
Definition: Self.h:58
static double CATCHABLE_AREA_L_STRECH_MIN
Definition: Self.h:53
static double STAMINA_CAPACITY
Definition: Self.h:103
static std::list< Command * > last_commands_sent
Definition: Self.cpp:92
static int getFocusCountAtTime(unsigned int time)
Definition: Self.cpp:810
static double AMOUNT_OF_SPEED
Definition: Self.h:105
static int TURN_COUNT
Definition: Self.h:115
static double DIRECTION_OF_SPEED
Definition: Self.h:107
static std::string TEAM_NAME
Definition: Self.h:48
static int ALLOW_MULT_DEFAULT_TYPE
Definition: Self.h:51
static int TACKLE_EXPIRES
Definition: Self.h:141
static double KICK_POWER_RATE_DELTA_MIN
Definition: Self.h:63
static double PLAYER_SIZE
Definition: Self.h:86
static std::string getFoulCardAtTime(unsigned int time)
Definition: Self.cpp:830
static std::string getFocusTargetAtTime(unsigned int time)
Definition: Self.cpp:806
static int getMoveCountAtTime(unsigned int time)
Definition: Self.cpp:778
static int FOUL_CHARGED
Definition: Self.h:147
static std::string SIDE
Definition: Self.h:50
static double EFFORT_MAX_DELTA_FACTOR
Definition: Self.h:56
Self The Self lorem Ipsum
Definition: Self.h:45
static double NEW_DASH_POWER_RATE_DELTA_MIN
Definition: Self.h:68
static double CATCHABLE_AREA_L_STRECH_MAX
Definition: Self.h:52
static std::string FOUL_CARD
Definition: Self.h:149
static double FOUL_DETECT_PROBABILITY_DELTA_FACTOR
Definition: Self.h:60
static double CATCHABLE_AREA_L_STRETCH
Definition: Self.h:94
static int getTackleExpiresAtTime(unsigned int time)
Definition: Self.cpp:814
static int getKickCountAtTime(unsigned int time)
Definition: Self.cpp:754
static int SUBS_MAX
Definition: Self.h:79
static double ARM_DIR
Definition: Self.h:133
static double DASH_POWER_RATE_DELTA_MIN
Definition: Self.h:55
static int getArmCountAtTime(unsigned int time)
Definition: Self.cpp:802
static std::string FOCUS_TARGET
Definition: Self.h:137
static double KICK_POWER_RATE
Definition: Self.h:92
static double EXTRA_STAMINA
Definition: Self.h:89
static double INERTIA_MOMENT
Definition: Self.h:84
static std::string VIEW_MODE_WIDTH
Definition: Self.h:95
static double ARM_DIST
Definition: Self.h:131
static std::string getViewModeQualityAtTime(unsigned int time)
Definition: Self.cpp:730
static double EFFORT
Definition: Self.h:101
static double PLAYER_DECAY_DELTA_MAX
Definition: Self.h:70
static int PT_MAX
Definition: Self.h:76
static int TYPE_ID
Definition: Self.h:80
static double getAmountOfSpeedAtTime(unsigned int time)
Definition: Self.cpp:746
static int getCatchCountAtTime(unsigned int time)
Definition: Self.cpp:774
static int CHANGE_VIEW_COUNT
Definition: Self.h:125
static double HEAD_ANGLE
Definition: Self.h:109
static double EFFORT_MIN
Definition: Self.h:91
static double EFFORT_MAX
Definition: Self.h:90
static double STAMINA_INC_MAX
Definition: Self.h:82
static double EFFORT_MIN_DELTA_FACTOR
Definition: Self.h:57
static int ARM_EXPIRES
Definition: Self.h:129
static std::string getViewModeWidthAtTime(unsigned int time)
Definition: Self.cpp:726
static double getDirectionOfSpeedAtTime(unsigned int time)
Definition: Self.cpp:750
static int RANDOM_SEED
Definition: Self.h:77
static int ARM_COUNT
Definition: Self.h:135
static void setLastCommandsSet(std::list< Command * > last_commands_sent)
Definition: Self.cpp:722
static std::list< std::string > COLLISION
Definition: Self.h:145
static double getHeadAngleAtTime(unsigned int time)
static double PLAYER_SPEED_MAX_DELTA_MIN
Definition: Self.h:74
static int getSayCountAtTime(unsigned int time)
Definition: Self.cpp:766
static int KICK_COUNT
Definition: Self.h:111
static int getTackleCountAtTime(unsigned int time)
Definition: Self.cpp:818
static int SAY_COUNT
Definition: Self.h:117
static double INERTIA_MOMENT_DELTA_FACTOR
Definition: Self.h:61
static int ARM_MOVABLE
Definition: Self.h:127
static double PLAYER_SPEED_MAX_DELTA_MAX
Definition: Self.h:73
Vector2D The Vector2D lorem Ipsum
Definition: Vector2D.h:45
void processSenseBody(std::string sense_body)
Definition: Self.cpp:317
static int getTurnNeckCountAtTime(unsigned int time)
Definition: Self.cpp:770
static int getDashCountAtTime(unsigned int time)
Definition: Self.cpp:758
static double PLAYER_SPEED_MAX
Definition: Self.h:81