LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
player_command.h
Go to the documentation of this file.
1// -*-c++-*-
2
8/*
9 *Copyright:
10
11 Copyright (C) Hidehisa AKIYAMA
12
13 This code is free software; you can redistribute it and/or
14 modify it under the terms of the GNU Lesser General Public
15 License as published by the Free Software Foundation; either
16 version 3 of the License, or (at your option) any later version.
17
18 This library is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public
24 License along with this library; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
27 *EndCopyright:
28 */
29
31
32#ifndef RCSC_PLAYER_COMMAND_H
33#define RCSC_PLAYER_COMMAND_H
34
36#include <rcsc/geom/vector_2d.h>
37#include <rcsc/geom/angle_deg.h>
38
39#include <string>
40#include <iostream>
41#include <cmath>
42
43namespace rcsc {
44
50public:
54 enum Type {
55 // connection commands
59 // base commands
60 MOVE,
61 DASH,
62 TURN,
63 KICK,
64 CATCH,
65 TACKLE,
66 // support commands
67 TURN_NECK,
68 CHANGE_VIEW,
69 CHANGE_FOCUS,
70 SAY,
71 POINTTO,
72 ATTENTIONTO,
73 // mode change commands
74 CLANG,
75 EAR,
76 // other commands
77 SENSE_BODY,
78 SCORE,
79 COMPRESSION,
80 // synch_mode command
81 DONE,
82
83 ILLEGAL
84 };
85
86protected:
91 { }
92
93public:
97 virtual
99 { }
100
105 virtual
106 Type type() const = 0;
107
113 virtual
114 std::ostream & toCommandString( std::ostream & to ) const = 0;
115
120 virtual
121 std::string name() const = 0;
122};
123
124
126
138 : public PlayerCommand {
139private:
140 std::string M_team_name;
141 double M_version;
142 bool M_goalie;
143public:
150 explicit
151 PlayerInitCommand( const std::string & team_name,
152 const double & version = 3.0,
153 const bool goalie = false );
154
159 Type type() const
160 {
161 return INIT;
162 }
163
169 std::ostream & toCommandString( std::ostream & to ) const;
170
175 std::string name() const
176 {
177 return std::string( "init" );
178 }
179};
180
181
183
195 : public PlayerCommand {
196private:
197 std::string M_team_name;
198 int M_unum;
199public:
205 PlayerReconnectCommand( const std::string & team_name,
206 const int unum );
207
212 Type type() const
213 {
214 return RECONNECT;
215 }
216
222 std::ostream & toCommandString( std::ostream & to ) const;
223
228 std::string name() const
229 {
230 return std::string( "reconnect" );
231 }
232};
233
234
236
246 : public PlayerCommand {
247private:
248
249public:
254
259 Type type() const
260 {
261 return BYE;
262 }
263
269 std::ostream & toCommandString( std::ostream & to ) const;
270
275 std::string name() const
276 {
277 return std::string( "bye" );
278 }
279};
280
284
289 : public PlayerCommand {
290protected:
295 { }
296
297public:
301 virtual
303 { }
304
309 virtual
310 Type type() const = 0;
311
317 virtual
318 std::ostream & toCommandString( std::ostream & to ) const = 0;
319
324 virtual
325 std::string name() const = 0;
326
327};
328
332
343 : public PlayerBodyCommand {
344private:
345 double M_x;
346 double M_y;
347public:
353 PlayerMoveCommand( const double & x,
354 const double & y )
355 : M_x( x )
356 , M_y( y )
357 { }
358
363 Type type() const
364 {
365 return MOVE;
366 }
367
373 std::ostream & toCommandString( std::ostream & to ) const;
374
379 std::string name() const
380 {
381 return std::string( "move" );
382 }
383
389 {
390 return Vector2D( M_x, M_y );
391 }
392
393};
394
396
407 : public PlayerBodyCommand {
408private:
409 double M_power;
410 double M_dir;
411public:
417 explicit
418 PlayerDashCommand( const double & power,
419 const double & dir = 0.0 )
420 : M_power( power )
421 , M_dir( dir )
422 { }
423
428 Type type() const
429 {
430 return DASH;
431 }
432
438 std::ostream & toCommandString( std::ostream & to ) const;
439
444 std::string name() const
445 {
446 return std::string( "dash" );
447 }
448
453 double dashPower() const
454 {
455 return M_power;
456 }
457
462 double dashDir() const
463 {
464 return M_dir;
465 }
466};
467
469
479 : public PlayerBodyCommand {
480private:
481 double M_moment;
482public:
487 explicit
488 PlayerTurnCommand( const double & moment )
489 : M_moment( moment )
490 { }
491
496 Type type() const
497 {
498 return TURN;
499 }
500
506 std::ostream & toCommandString( std::ostream & to ) const;
507
512 std::string name() const
513 {
514 return std::string( "turn" );
515 }
516
521 double turnMoment() const
522 {
523 return M_moment;
524 }
525};
526
527
529
539 : public PlayerBodyCommand {
540private:
541 double M_power;
542 double M_dir;
543public:
549 PlayerKickCommand( const double & power,
550 const double & dir )
551 : M_power( power )
552 , M_dir( dir )
553 { }
554
559 Type type() const
560 {
561 return KICK;
562 }
563
569 std::ostream & toCommandString( std::ostream & to ) const;
570
575 std::string name() const
576 {
577 return std::string( "kick" );
578 }
579
584 double kickPower() const
585 {
586 return M_power;
587 }
588
593 double kickDir() const
594 {
595 return M_dir;
596 }
597};
598
600
610 : public PlayerBodyCommand {
611private:
612 double M_dir;
613public:
618 explicit
619 PlayerCatchCommand( const double & rel_dir )
620 : M_dir( rel_dir )
621 { }
622
627 Type type() const
628 {
629 return CATCH;
630 }
631
637 std::ostream & toCommandString( std::ostream & to ) const;
638
643 std::string name() const
644 {
645 return std::string( "catch" );
646 }
647
652 double catchDir() const
653 {
654 return M_dir;
655 }
656};
657
659
670 : public PlayerBodyCommand {
671private:
672 double M_power_or_dir;
673 bool M_foul;
674public:
679 explicit
680 PlayerTackleCommand( const double & power_or_dir )
681 : M_power_or_dir( power_or_dir ),
682 M_foul( false )
683 { }
684
685 PlayerTackleCommand( const double & power_or_dir,
686 const bool foul )
687 : M_power_or_dir( power_or_dir ),
688 M_foul( foul )
689 { }
690
695 Type type() const
696 {
697 return TACKLE;
698 }
699
705 std::ostream & toCommandString( std::ostream & to ) const;
706
711 std::string name() const
712 {
713 return std::string( "tackle" );
714 }
715
720 double tacklePowerOrDir() const
721 {
722 return M_power_or_dir;
723 }
724
725 bool tackleFoul() const
726 {
727 return M_foul;
728 }
729};
730
734
739 : public PlayerCommand {
740protected:
745 { }
746
747public:
751 virtual
753 { }
754
759 virtual
760 Type type() const = 0;
761
767 virtual
768 std::ostream & toCommandString( std::ostream & to ) const = 0;
769
774 virtual
775 std::string name() const = 0;
776};
777
781
791 : public PlayerSupportCommand {
792private:
793 double M_moment;
794public:
799 explicit
801 : M_moment( moment )
802 { }
803
808 Type type() const
809 {
810 return TURN_NECK;
811 }
812
818 std::ostream & toCommandString( std::ostream & to ) const;
819
824 std::string name() const
825 {
826 return std::string( "turn_neck" );
827 }
828
833 const
834 double & moment() const
835 {
836 return M_moment;
837 }
838};
839
841
854 : public PlayerSupportCommand {
855private:
856 ViewWidth M_width;
857 ViewQuality M_quality;
858public:
865 const ViewQuality & q )
866 : M_width( w )
867 , M_quality( q )
868 { }
869
874 Type type() const
875 {
876 return CHANGE_VIEW;
877 }
878
884 std::ostream & toCommandString( std::ostream & to ) const;
885
890 std::string name() const
891 {
892 return std::string( "change_view" );
893 }
894
899 const
900 ViewWidth & width() const
901 {
902 return M_width;
903 }
904
909 const
911 {
912 return M_quality;
913 }
914};
915
917
927 : public PlayerSupportCommand {
928private:
929 double M_moment_dist;
930 double M_moment_dir;
931
932 PlayerChangeFocusCommand() = delete; // not used
933public:
934
940 PlayerChangeFocusCommand( const double moment_dist,
941 const double moment_dir )
942 : M_moment_dist( moment_dist ),
943 M_moment_dir( moment_dir )
944 { }
945
950 Type type() const
951 {
952 return CHANGE_FOCUS;
953 }
954
960 std::ostream & toCommandString( std::ostream & to ) const;
961
966 std::string name() const
967 {
968 return std::string( "change_focus" );
969 }
970
975 double momentDist() const
976 {
977 return M_moment_dist;
978 }
979
984 double momentDir() const
985 {
986 return M_moment_dir;
987 }
988
989};
990
992
1003 : public PlayerSupportCommand {
1004private:
1005 std::string M_message;
1006 double M_version;
1007public:
1008
1013 explicit
1014 PlayerSayCommand( const double & version )
1015 : M_version( version )
1016 { }
1017
1023 PlayerSayCommand( const char * msg,
1024 const double & version )
1025 : M_message( msg )
1026 , M_version( version )
1027 { }
1033 PlayerSayCommand( const std::string & msg,
1034 const double & version )
1035 : M_message( msg )
1036 , M_version( version )
1037 { }
1038
1043 Type type() const
1044 {
1045 return SAY;
1046 }
1047
1053 std::ostream & toCommandString( std::ostream & to ) const;
1054
1059 std::string name() const
1060 {
1061 return std::string( "say" );
1062 }
1063
1068 void assign( const std::string & msg )
1069 {
1070 M_message = msg;
1071 }
1072
1077 void append( const std::string & msg )
1078 {
1079 M_message += msg;
1080 }
1081
1086 const
1087 std::string & message() const
1088 {
1089 return M_message;
1090 }
1091
1092};
1093
1095
1106 : public PlayerSupportCommand {
1107private:
1108 bool M_on;
1109 double M_dist;
1110 double M_dir;
1111public:
1116 : M_on( false )
1117 , M_dist( 0.0 )
1118 , M_dir( 0.0 )
1119 { }
1120
1126 PlayerPointtoCommand( const double & dist,
1127 const double & rel_dir )
1128 : M_on( true )
1129 , M_dist( dist )
1130 , M_dir( rel_dir )
1131 { }
1132
1137 Type type() const
1138 {
1139 return POINTTO;
1140 }
1141
1147 std::ostream & toCommandString( std::ostream & to ) const;
1148
1153 std::string name() const
1154 {
1155 return std::string( "pointto" );
1156 }
1157
1158
1163 bool pointtoOn() const
1164 {
1165 return M_on;
1166 }
1167
1172 const
1173 double & pointtoDist() const
1174 {
1175 return M_dist;
1176 }
1177
1182 const
1183 double & pointtoDir() const
1184 {
1185 return M_dist;
1186 }
1187};
1188
1190
1203 : public PlayerSupportCommand {
1204public:
1209 OUR,
1210 OPP,
1211 NONE,
1212 };
1213
1214private:
1215 SideType M_side;
1216 int M_number;
1217public:
1222 : M_side( NONE )
1223 , M_number( 0 )
1224 { }
1225
1232 const int unum )
1233 : M_side( side )
1234 , M_number( unum )
1235 { }
1236
1241 Type type() const
1242 {
1243 return ATTENTIONTO;
1244 }
1245
1251 std::ostream & toCommandString( std::ostream & to ) const;
1252
1257 std::string name() const
1258 {
1259 return std::string( "attentionto" );
1260 }
1261
1266 bool isOn() const
1267 {
1268 return M_side != NONE;
1269 }
1270
1276 {
1277 return M_side;
1278 }
1279
1284 int number() const
1285 {
1286 return M_number;
1287 }
1288};
1289
1291
1303 : public PlayerSupportCommand {
1304private:
1305 int M_min;
1306 int M_max;
1307public:
1313 PlayerCLangCommand( const int min_version,
1314 const int max_version )
1315 : M_min( min_version )
1316 , M_max( max_version )
1317 { }
1318
1323 Type type() const
1324 {
1325 return CLANG;
1326 }
1327
1333 std::ostream & toCommandString( std::ostream & to ) const;
1334
1339 std::string name() const
1340 {
1341 return std::string( "clang" );
1342 }
1343
1348 int minVer() const
1349 {
1350 return M_min;
1351 }
1352
1357 int maxVer() const
1358 {
1359 return M_max;
1360 }
1361};
1362
1364
1390 : public PlayerSupportCommand {
1391public:
1396 ON,
1397 OFF,
1398 };
1403 OUR,
1404 OPP,
1405 };
1410 COMPLETE,
1411 PARTIAL,
1412 ALL,
1413 };
1414
1415private:
1416 OnOffType M_onoff;
1417 SideType M_side;
1418 ModeType M_mode;
1419public:
1426 const SideType side )
1427 : M_onoff( onoff )
1428 , M_side( side )
1429 , M_mode( ALL )
1430 { }
1431
1439 const SideType side,
1440 const ModeType mode )
1441 : M_onoff( onoff )
1442 , M_side( side )
1443 , M_mode( mode )
1444 { }
1445
1450 Type type() const
1451 {
1452 return EAR;
1453 }
1454
1460 std::ostream & toCommandString( std::ostream & to ) const;
1461
1466 std::string name() const
1467 {
1468 return std::string( "ear" );
1469 }
1470
1471
1477 {
1478 return M_onoff;
1479 }
1480
1486 {
1487 return M_side;
1488 }
1489
1495 {
1496 return M_mode;
1497 }
1498
1499};
1500
1502
1514 : public PlayerSupportCommand {
1515private:
1516
1517public:
1522 { }
1523
1528 Type type() const
1529 {
1530 return SENSE_BODY;
1531 }
1532
1538 std::ostream & toCommandString( std::ostream & to ) const;
1539
1544 std::string name() const
1545 {
1546 return std::string( "sense_body" );
1547 }
1548};
1549
1551
1564 : public PlayerSupportCommand {
1565private:
1566
1567public:
1572 { }
1573
1578 Type type() const
1579 {
1580 return SCORE;
1581 }
1582
1588 std::ostream & toCommandString( std::ostream & to ) const;
1589
1594 std::string name() const
1595 {
1596 return std::string( "score" );
1597 }
1598};
1599
1601
1614 : public PlayerSupportCommand {
1615private:
1616 int M_level;
1617public:
1622 explicit
1624 : M_level( level )
1625 { }
1626
1631 Type type() const
1632 {
1633 return COMPRESSION;
1634 }
1635
1641 std::ostream & toCommandString( std::ostream & to ) const;
1642
1647 std::string name() const
1648 {
1649 return std::string( "compression" );
1650 }
1651
1656 int level() const
1657 {
1658 return M_level;
1659 }
1660};
1661
1662
1664
1674 : public PlayerSupportCommand {
1675private:
1676
1677public:
1682 { }
1683
1688 Type type() const
1689 {
1690 return DONE;
1691 }
1692
1698 std::ostream & toCommandString( std::ostream & to ) const;
1699
1704 std::string name() const
1705 {
1706 return std::string( "done" );
1707 }
1708};
1709
1710}
1711
1712/*
1713
1714init,
1715"(init <teamname>)"
1716"(init <teamname> (version <ver>))"
1717"(init <teamname> (version <ver>) (goalie))"
1718
1719bye,
1720"(bye)"
1721
1722
1723
1724move,
1725"(move <x> <y>)"
1726"(move (<x> <y>))"
1727
1728dash,
1729"(dash <power>)"
1730
1731turn,
1732"(turn <moment>)"
1733
1734kick,
1735"(kick <power> <dir>)"
1736
1737catch,
1738"(catch <dir>)"
1739
1740tackle,
1741"(tackle <power>)"
1742
1743
1744
1745turn_neck,
1746"(turn_neck <moment>)"
1747
1748change_view,
1749"(change_view <width> <qual>)"
1750<width> :- narrow | normal | wide
1751<qual> :- high | low
1752
1753say,
1754"(say <message>)"
1755"(say "<message>")" <--- in server 8+, to use the double quatation is recommended
1756
1757pointto,
1758"(pointto <dist> <dir>)"
1759"(pointto off)"
1760
1761attentionto,
1762"(attentionto <side> <number>)"
1763"(attentionto off)"
1764side :- our | opp | l | left | r | right | TEAMNAME
1765<--- server check the string in this order
1766
1767clang,
1768"(clang (ver <min> <max>))"
1769
1770ear,
1771"(ear <flag> <side> <mode>)"
1772"(ear <flag> <mode>)"
1773"(ear <flag> <side>)"
1774"(ear <flag>)"
1775<flag> :- on | off
1776<side> :- our | opp | left | l | right | r | TEAMNAME
1777<mode> :- partial | p | complete | c
1778
1779
1780sense_body,
1781"(sense_body)"
1782
1783score,
1784"(score)"
1785
1786compression,
1787"(compression <level>)"
1788<level> :- [0-9]
1789
1790done,
1791"(done)"
1792
1793
1794
1795*/
1796
1797#endif
degree wrapper class Header File.
player's attentionto command
Definition: player_command.h:1203
std::string name() const
get command paramter
Definition: player_command.h:1257
SideType
target player's side type
Definition: player_command.h:1208
SideType side() const
get target player's side type
Definition: player_command.h:1275
Type type() const
get command type
Definition: player_command.h:1241
bool isOn() const
get on/off flag
Definition: player_command.h:1266
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
int number() const
get target player's uniform number
Definition: player_command.h:1284
PlayerAttentiontoCommand(const SideType side, const int unum)
construct on type attentionto command
Definition: player_command.h:1231
PlayerAttentiontoCommand()
construct off type attentionto command
Definition: player_command.h:1221
abstract body command
Definition: player_command.h:289
virtual Type type() const =0
get command type (pure virtual)
virtual std::ostream & toCommandString(std::ostream &to) const =0
put command string to ostream (pure virtual)
PlayerBodyCommand()
default constructor is protected because this is abstract class
Definition: player_command.h:294
virtual std::string name() const =0
get command name (pure virtual)
virtual ~PlayerBodyCommand()
virtual destructor. nothing to do.
Definition: player_command.h:302
player's disconnect command
Definition: player_command.h:246
PlayerByeCommand()
constructor. nothingto do
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
Type type() const
get command type
Definition: player_command.h:259
std::string name() const
get command name
Definition: player_command.h:275
command to specify the player's supported clang version
Definition: player_command.h:1303
int minVer() const
get clang command parameter
Definition: player_command.h:1348
Type type() const
get command type
Definition: player_command.h:1323
std::string name() const
get command paramter
Definition: player_command.h:1339
PlayerCLangCommand(const int min_version, const int max_version)
construct with version parameters
Definition: player_command.h:1313
int maxVer() const
get clang command parameter
Definition: player_command.h:1357
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
goalie's catch command
Definition: player_command.h:610
Type type() const
get command type
Definition: player_command.h:627
PlayerCatchCommand(const double &rel_dir)
construct with catch direction
Definition: player_command.h:619
double catchDir() const
get catch command parameter
Definition: player_command.h:652
std::string name() const
get command name
Definition: player_command.h:643
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
player's change focus command
Definition: player_command.h:927
double momentDist() const
get the command parameter
Definition: player_command.h:975
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get thencommand name
Definition: player_command.h:966
Type type() const
get command type
Definition: player_command.h:950
PlayerChangeFocusCommand(const double moment_dist, const double moment_dir)
construct with command parameters
Definition: player_command.h:940
double momentDir() const
get the command parameter
Definition: player_command.h:984
player's change view command
Definition: player_command.h:854
std::string name() const
get command paramter
Definition: player_command.h:890
Type type() const
get command type
Definition: player_command.h:874
const ViewWidth & width() const
get view width of this command
Definition: player_command.h:900
const ViewQuality & quality() const
get view quality of this command
Definition: player_command.h:910
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
PlayerChangeViewCommand(const ViewWidth &w, const ViewQuality &q)
construct with view mode objects
Definition: player_command.h:864
abstract player command class
Definition: player_command.h:49
Type
player client command Id
Definition: player_command.h:54
@ INIT
server connection command
Definition: player_command.h:56
@ RECONNECT
server reconnection command
Definition: player_command.h:57
@ BYE
server disconnection command
Definition: player_command.h:58
virtual Type type() const =0
get command type (pure virtual)
virtual std::ostream & toCommandString(std::ostream &to) const =0
put command string to ostream (pure virtual)
virtual std::string name() const =0
get command name (pure virtual)
virtual ~PlayerCommand()
virtual destructor, but nothing to do
Definition: player_command.h:98
PlayerCommand()
constructor is protected because this is abstract class.
Definition: player_command.h:90
command to set message compression level
Definition: player_command.h:1614
Type type() const
get command type
Definition: player_command.h:1631
int level() const
get compression command parameter
Definition: player_command.h:1656
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get command paramter
Definition: player_command.h:1647
PlayerCompressionCommand(const int level)
construct with compression level
Definition: player_command.h:1623
player's dash command
Definition: player_command.h:407
std::string name() const
get command name
Definition: player_command.h:444
double dashPower() const
get dash command parameter
Definition: player_command.h:453
double dashDir() const
get dash command parameter
Definition: player_command.h:462
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
PlayerDashCommand(const double &power, const double &dir=0.0)
construct with dash power
Definition: player_command.h:418
Type type() const
get command type
Definition: player_command.h:428
command to send done command for (think) message in synch_mode
Definition: player_command.h:1674
Type type() const
get command type
Definition: player_command.h:1688
PlayerDoneCommand()
constructor. nothing to do
Definition: player_command.h:1681
std::string name() const
get command paramter
Definition: player_command.h:1704
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
command to specify player's ear mode
Definition: player_command.h:1390
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get command paramter
Definition: player_command.h:1466
ModeType
ear mode types that specifies enabled hear message type
Definition: player_command.h:1409
PlayerEarCommand(const OnOffType onoff, const SideType side, const ModeType mode)
constcust command for specified type message
Definition: player_command.h:1438
SideType side() const
get ear command parameter
Definition: player_command.h:1485
OnOffType onOff() const
get ear command parameter
Definition: player_command.h:1476
PlayerEarCommand(const OnOffType onoff, const SideType side)
constcust command for all type message
Definition: player_command.h:1425
Type type() const
get command type
Definition: player_command.h:1450
ModeType mode() const
get ear command parameter
Definition: player_command.h:1494
OnOffType
on/off types
Definition: player_command.h:1395
SideType
side types
Definition: player_command.h:1402
player's init command
Definition: player_command.h:138
PlayerInitCommand(const std::string &team_name, const double &version=3.0, const bool goalie=false)
construct with init parameters
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get command name
Definition: player_command.h:175
Type type() const
get command type
Definition: player_command.h:159
kick command
Definition: player_command.h:539
Type type() const
get command type
Definition: player_command.h:559
std::string name() const
get command name
Definition: player_command.h:575
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
double kickPower() const
get kick command parameter
Definition: player_command.h:584
PlayerKickCommand(const double &power, const double &dir)
construct with kick parameters
Definition: player_command.h:549
double kickDir() const
get kick command parameter
Definition: player_command.h:593
player's move command
Definition: player_command.h:343
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
Vector2D movePos() const
get move command parameter
Definition: player_command.h:388
Type type() const
get command type
Definition: player_command.h:363
PlayerMoveCommand(const double &x, const double &y)
construct with move target point
Definition: player_command.h:353
std::string name() const
get command name
Definition: player_command.h:379
player's turn neck command
Definition: player_command.h:1106
std::string name() const
get command paramter
Definition: player_command.h:1153
const double & pointtoDist() const
get pointto command parameter
Definition: player_command.h:1173
PlayerPointtoCommand()
target angle relative to body angle
Definition: player_command.h:1115
PlayerPointtoCommand(const double &dist, const double &rel_dir)
construct on type pointto command with point target
Definition: player_command.h:1126
Type type() const
get command type
Definition: player_command.h:1137
bool pointtoOn() const
get pointto command switch
Definition: player_command.h:1163
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
const double & pointtoDir() const
get pointto command parameter
Definition: player_command.h:1183
reconnect command
Definition: player_command.h:195
PlayerReconnectCommand(const std::string &team_name, const int unum)
construct with reconnect parameters
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get command name
Definition: player_command.h:228
Type type() const
get command type
Definition: player_command.h:212
player's say command
Definition: player_command.h:1003
const std::string & message() const
get command parameter
Definition: player_command.h:1087
void append(const std::string &msg)
append new string
Definition: player_command.h:1077
PlayerSayCommand(const double &version)
construct with client version, no message
Definition: player_command.h:1014
PlayerSayCommand(const char *msg, const double &version)
construct with cstring say message
Definition: player_command.h:1023
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
void assign(const std::string &msg)
assign new message
Definition: player_command.h:1068
PlayerSayCommand(const std::string &msg, const double &version)
construct with say message string
Definition: player_command.h:1033
Type type() const
get command type
Definition: player_command.h:1043
std::string name() const
get command paramter
Definition: player_command.h:1059
command to require current game score
Definition: player_command.h:1564
Type type() const
get command type
Definition: player_command.h:1578
std::string name() const
get command paramter
Definition: player_command.h:1594
PlayerScoreCommand()
constructor. nothing to do
Definition: player_command.h:1571
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
command to require sense_body
Definition: player_command.h:1514
PlayerSenseBodyCommand()
constructor. nothing to do
Definition: player_command.h:1521
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get command paramter
Definition: player_command.h:1544
Type type() const
get command type
Definition: player_command.h:1528
abstract support command
Definition: player_command.h:739
PlayerSupportCommand()
constructor is protected because this is abstract class.
Definition: player_command.h:744
virtual std::ostream & toCommandString(std::ostream &to) const =0
put command string to ostream (pure virtual)
virtual std::string name() const =0
get command name (pure virtual)
virtual ~PlayerSupportCommand()
virtual destructor, but nothing to do
Definition: player_command.h:752
virtual Type type() const =0
get command type (pure virtual)
player's tackle command
Definition: player_command.h:670
PlayerTackleCommand(const double &power_or_dir)
construct with tackle power
Definition: player_command.h:680
Type type() const
get command type
Definition: player_command.h:695
std::string name() const
get command name
Definition: player_command.h:711
double tacklePowerOrDir() const
get tackle command parameter
Definition: player_command.h:720
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
turn command
Definition: player_command.h:479
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
PlayerTurnCommand(const double &moment)
construct with turn moment
Definition: player_command.h:488
double turnMoment() const
get turn command parameter
Definition: player_command.h:521
std::string name() const
get command name
Definition: player_command.h:512
Type type() const
get command type
Definition: player_command.h:496
player's turn neck command
Definition: player_command.h:791
const double & moment() const
get command paramter
Definition: player_command.h:834
Type type() const
get command type
Definition: player_command.h:808
PlayerTurnNeckCommand(const double &moment)
construct with moment to turn neck
Definition: player_command.h:800
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get command name
Definition: player_command.h:824
2D point vector class
Definition: vector_2d.h:46
view quality data class
Definition: view_mode.h:216
view width data class
Definition: view_mode.h:43
2d vector class Header File.
const char * version()
get the package version number string.
player view mode data classes Header File