クラス rcsc::GameMode

playmode(referee info) wrapper class [詳細]

#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 &current)
 analyze playmode string and update internal status
const GameTimetime () 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


説明

playmode(referee info) wrapper class

This class can be updated by server playmode string using update() method. This class can also handle current game score.


列挙型

enum rcsc::GameMode::Type

playmode type Id

列挙型の値:
INIT  server connection command
RECONNECT  server reconnection command
BYE  server disconnection command
INIT  connection command


関数

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]

get last update time

戻り値:
const reference to the GameTime object

Type rcsc::GameMode::type (  )  const [inline]

get current playmode type

戻り値:
client side playmode type Id

SideID rcsc::GameMode::side (  )  const [inline]

get current playmode side

戻り値:
playmode side Id

int rcsc::GameMode::scoreLeft (  )  const [inline]

get current left score

戻り値:
left score value

int rcsc::GameMode::scoreRight (  )  const [inline]

get current right score

戻り値:
right score value

bool rcsc::GameMode::isServerCycleStoppedMode (  )  const

check if current playmode is one of server cycle stopped type.

戻り値:
true if cycle is stopped, false other wise

bool rcsc::GameMode::isGameEndMode (  )  const

check if current playmode is game end type.

戻り値:
true if game is end

bool rcsc::GameMode::isPenaltyKickMode (  )  const

check if current playmode is one of penalty kick mode.

戻り値:
true if game is penalty kick mode

bool rcsc::GameMode::isOurSetPlay ( const SideID  ourside  )  const

check if current mode is our setplay

引数:
ourside clinet's team side
戻り値:
true if current playmode is our setplay mode

PlayMode rcsc::GameMode::getServerPlayMode (  )  const

get rcssserver playmode

戻り値:
rcssserver playmode Id

std::ostream & rcsc::GameMode::print ( std::ostream &  os  )  const

print current playmode string to stream

引数:
os reference to the output stream
戻り値:
reference to the output stream


このクラスの説明は次のファイルから生成されました:
librcscに対してThu May 1 15:41:26 2008に生成されました。  doxygen 1.5.0