#include <game_mode.h>
Public 型 | |
enum | Type { INIT, BYE, CHECK_BALL, LOOK, TEAM_NAMES, EYE, CHANGE_PLAYER_TYPE, CHANGE_PLAYER_TYPES, SAY, TEAM_GRAPHIC, COMPRESSION, DONE, ILLEGAL, BeforeKickOff, TimeOver, PlayOn, KickOff_, KickIn_, FreeKick_, CornerKick_, GoalKick_, AfterGoal_, OffSide_, PenaltyKick_, FirstHalfOver, Pause, Human, FoulCharge_, FoulPush_, FoulMultipleAttacker_, FoulBallOut_, BackPass_, FreeKickFault_, CatchFault_, IndFreeKick_, PenaltySetup_, PenaltyReady_, PenaltyTaken_, PenaltyMiss_, PenaltyScore_, PenaltyOnfield_, PenaltyFoul_, GoalieCatch_, ExtendHalf, MODE_MAX, INIT, BYE, START, FOUL, PLAYER, DISCARD, COMPRESSION, ILLEGAL, INIT, RECONNECT, BYE, MOVE, DASH, TURN, KICK, CATCH, TACKLE, TURN_NECK, CHANGE_VIEW, SAY, POINTTO, ATTENTIONTO, CLANG, EAR, SENSE_BODY, SCORE, COMPRESSION, DONE, ILLEGAL, NARROW, NORMAL, WIDE, ILLEGAL, HIGH, LOW, ILLEGAL, INIT, CHECK_BALL, LOOK, TEAM_NAMES, EAR, EYE, START, CHANGE_MODE, MOVE, RECOVER, CHANGE_PLAYER_TYPE, SAY, COMPRESSION, DONE, ILLEGAL } |
playmode type Id [詳細] | |
typedef std::pair< Type, rcsc::SideID > | Pair |
Public メソッド | |
GameMode () | |
init member variables | |
bool | update (const std::string &mode_str, const GameTime ¤t) |
analyze playmode string and update internal status | |
const GameTime & | time () const |
get last update time | |
Type | type () const |
get current playmode type | |
SideID | side () const |
get current playmode side | |
int | scoreLeft () const |
get current left score | |
int | scoreRight () const |
get current right score | |
bool | isServerCycleStoppedMode () const |
check if current playmode is one of server cycle stopped type. | |
bool | isGameEndMode () const |
check if current playmode is game end type. | |
bool | isPenaltyKickMode () const |
check if current playmode is one of penalty kick mode. | |
bool | isOurSetPlay (const SideID ourside) const |
check if current mode is our setplay | |
PlayMode | getServerPlayMode () const |
get rcssserver playmode | |
std::ostream & | print (std::ostream &os) const |
print current playmode string to stream |
This class can be updated by server playmode string using update() method. This class can also handle current game score.
enum rcsc::GameMode::Type |
bool rcsc::GameMode::update | ( | const std::string & | mode_str, | |
const GameTime & | current | |||
) |
analyze playmode string and update internal status
mode_str | playmode string sent from server | |
current | current game time |
true | successfully updated. | |
false | detected illegal playmode string |
const GameTime& rcsc::GameMode::time | ( | ) | const [inline] |
Type rcsc::GameMode::type | ( | ) | const [inline] |
get current playmode type
SideID rcsc::GameMode::side | ( | ) | const [inline] |
get current playmode side
int rcsc::GameMode::scoreLeft | ( | ) | const [inline] |
get current left score
int rcsc::GameMode::scoreRight | ( | ) | const [inline] |
get current right score
bool rcsc::GameMode::isServerCycleStoppedMode | ( | ) | const |
check if current playmode is one of server cycle stopped type.
bool rcsc::GameMode::isGameEndMode | ( | ) | const |
check if current playmode is game end type.
bool rcsc::GameMode::isPenaltyKickMode | ( | ) | const |
check if current playmode is one of penalty kick mode.
bool rcsc::GameMode::isOurSetPlay | ( | const SideID | ourside | ) | const |
check if current mode is our setplay
ourside | clinet's team side |
PlayMode rcsc::GameMode::getServerPlayMode | ( | ) | const |
get rcssserver playmode
std::ostream & rcsc::GameMode::print | ( | std::ostream & | os | ) | const |
print current playmode string to stream
os | reference to the output stream |