54 ss <<
"(move " << std::setprecision(4) << x <<
" " << y <<
")" << std::endl;
56 std::getline(ss, command);
69 ss <<
"(turn " << std::setprecision(4) << moment <<
")" << std::endl;
71 std::getline(ss, command);
84 ss <<
"(turn_neck " << std::setprecision(4) << moment <<
")" << std::endl;
86 std::getline(ss, command);
103 std::stringstream ss;
104 ss <<
"(dash " << std::setprecision(4) << power <<
" " << direction <<
")" << std::endl;
106 std::getline(ss, command);
113 std::string command =
"(say " + message +
")";
120 std::stringstream ss;
121 ss <<
"(catch " << std::setprecision(4) << direction <<
")" << std::endl;
123 std::getline(ss, command);
130 std::stringstream ss;
131 ss <<
"(kick " << std::setprecision(4) << power <<
" " << direction <<
")" << std::endl;
133 std::getline(ss, command);
140 std::stringstream ss;
141 ss <<
"(tackle " << std::setprecision(4) << power << (willToFoul ?
" true" :
" false") << std::endl;
143 std::getline(ss, command);
150 std::stringstream ss;
151 ss <<
"(pointto " << std::setprecision(4) << distance <<
" " << direction <<
")" << std::endl;
153 std::getline(ss, command);
160 std::string command =
"(change_view " + width +
")";
167 std::stringstream ss;
168 ss <<
"(move " <<
object <<
" " << std::setprecision(4) << x <<
" " << y <<
")" << std::endl;
170 std::getline(ss, command);
176 std::string command =
"(change_mode " + mode +
")";
183 std::string command =
"(start)";
189 std::string command =
"(recover)";
195 int commands_sent_counter = 0;
196 std::list<Command*> commands_sent;
198 std::string message =
"";
206 commands_sent.push_back(command_to_send);
208 commands_sent_counter++;
215 return commands_sent_counter;
void pointTo(double distance, double direction)
Used by Player and Goalie.
void dash(double power, double direction)
std::list< Command > commands_history
Connect * commands_connect_ptr
void changeView(std::string width)
Used by Player and Goalie.
Used by Player and Goalie.
void changeMode(std::string mode)
Used by Player and Goalie.
Commands(Connect *connect)
Used by Player and Goalie.
void move(double x, double y)
std::list< Command * > commands_to_send
bool sendMessage(std::string msg)
Used by Player and Goalie.
void moveObject(std::string object, double x, double y)
void catchBall(double direction)
Used by Player and Goalie.
void kick(double power, double direction)
Command The Command lorem Ipsum
void tackle(double power, bool willToFoul)
static unsigned int COMMANDS_MAX_HISTORY
void changeStatusTo(COMMAND_STATUS status)
Used by Player and Goalie.
Used by Player and Goalie.
Used by Player and Goalie.
void say(std::string message)
static unsigned int SIMULATION_TIME
void turnNeck(double moment)
static void setLastCommandsSet(std::list< Command * > last_commands_sent)