Phoenix2D-Library  0.10
Command.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 COMMAND_H_
22 #define COMMAND_H_
23 
24 #include <string>
25 
29 namespace Phoenix
30 {
31 
38  SENT,
41 };
42 
49  MOVE,
50  DASH,
51  TURN,
52  SAY,
54  KICK,
64 };
65 
70 class Command {
71  std::string command;
72  int weight;
75  double double_arg_0;
76  double double_arg_1;
77  std::string string_arg_0;
78  std::string string_arg_1;
79  bool bool_arg_0;
80  bool bool_arg_1;
82 public:
83  Command();
84  Command(std::string command, int weight, COMMAND_TYPE type);
85  ~Command();
86  void setArgs(void* arg0, void* arg1 = 0, void* arg2 = 0);
87  std::string getCommand();
88  int getWeight();
91  double getDashPower();
92  double getDashDirection();
93  double getTurnMoment();
94  double getMoveX();
95  double getMoveY();
96  std::string getSayMessage();
97  double getCatchDirection();
98  double getKickPower();
99  double getKickDirection();
100  double getTacklePower();
101  bool getTackleWillToFoul();
102  double getTurnNeckMoment();
103  double getPointDistance();
104  double getPointDirection();
105  std::string getChangeViewWidth();
107  int createdAt();
108 };
109 
110 } // End namespace Phoenix
114 #endif /* COMMAND_H_ */
Used by Player and Goalie.
Definition: Command.h:56
std::string string_arg_1
Definition: Command.h:78
COMMAND_STATUS status
Definition: Command.h:74
double getTurnMoment()
Definition: Command.cpp:105
double getKickPower()
Definition: Command.cpp:125
Used by Trainer.
Definition: Command.h:61
Used by Player and Goalie.
Definition: Command.h:53
Used by Player and Goalie.
Definition: Command.h:50
Used by Player and Goalie.
Definition: Command.h:52
COMMAND_TYPE
COMMAND_TYPE The Command type lorem Ipsum
Definition: Command.h:47
double getMoveY()
Definition: Command.cpp:113
double getMoveX()
Definition: Command.cpp:109
Used by Player and Goalie.
Definition: Command.h:57
double getKickDirection()
Definition: Command.cpp:129
double double_arg_0
Definition: Command.h:75
COMMAND_STATUS getCommandStatus()
Definition: Command.cpp:161
double double_arg_1
Definition: Command.h:76
std::string getChangeViewWidth()
Definition: Command.cpp:153
std::string string_arg_0
Definition: Command.h:77
int simulation_time
Definition: Command.h:81
Used by Trainer.
Definition: Command.h:60
double getTacklePower()
Definition: Command.cpp:133
Used by Player and Goalie.
Definition: Command.h:49
bool getTackleWillToFoul()
Definition: Command.cpp:137
double getDashPower()
Definition: Command.cpp:97
double getDashDirection()
Definition: Command.cpp:101
COMMAND_STATUS
COMMAND_STATUS The Command type lorem Ipsum
Definition: Command.h:36
Used by Trainer.
Definition: Command.h:62
Used by Player and Goalie.
Definition: Command.h:51
Command The Command lorem Ipsum
Definition: Command.h:70
std::string getSayMessage()
Definition: Command.cpp:117
Used by Player and Goalie.
Definition: Command.h:48
void changeStatusTo(COMMAND_STATUS status)
Definition: Command.cpp:157
void setArgs(void *arg0, void *arg1=0, void *arg2=0)
Definition: Command.cpp:58
std::string command
Definition: Command.h:71
COMMAND_TYPE getCommandType()
Definition: Command.cpp:93
Used by Player and Goalie.
Definition: Command.h:55
double getCatchDirection()
Definition: Command.cpp:121
bool bool_arg_1
Definition: Command.h:80
bool bool_arg_0
Definition: Command.h:79
Used by Player and Goalie.
Definition: Command.h:58
Used by Player and Goalie.
Definition: Command.h:54
std::string getCommand()
Definition: Command.cpp:85
double getPointDirection()
Definition: Command.cpp:149
Used by Trainer.
Definition: Command.h:59
Used by trainer and/or coach.
Definition: Command.h:63
double getTurnNeckMoment()
Definition: Command.cpp:141
double getPointDistance()
Definition: Command.cpp:145
COMMAND_TYPE type
Definition: Command.h:73