Class StrategyManager

java.lang.Object
  |
  +--StrategyManager
All Implemented Interfaces:
DebugInterface, PlayModeInterface, StrategyGeneralInterface

public class StrategyManager
extends java.lang.Object
implements PlayModeInterface, StrategyGeneralInterface, DebugInterface


Field Summary
(package private)  boolean DEBUG
           
 Formation formation
          the currently loaded formation
private  int lastCyclePlayMode
          playmode of last cycle
private  Player player
          pointer to Player
 Strategy strategy
          the currently loaded strategy
private  int strategyFlag
          The strategyFlag attribute stores the current strategic game situation identifier (offensive game situation, defensive game situation, ...)
This identifier is essential to the generation of appropriate tactics.
 
Fields inherited from interface PlayModeInterface
PLAYMODE_BEFORE_KICK_OFF, PLAYMODE_EXTEND, PLAYMODE_HALF_TIME, PLAYMODE_OPPONENTS_CORNER_KICK, PLAYMODE_OPPONENTS_FOUL, PLAYMODE_OPPONENTS_FREE_KICK, PLAYMODE_OPPONENTS_GOAL, PLAYMODE_OPPONENTS_GOAL_KICK, PLAYMODE_OPPONENTS_GOALIE_CATCH, PLAYMODE_OPPONENTS_KICK_IN, PLAYMODE_OPPONENTS_KICK_OFF, PLAYMODE_OPPONENTS_OFFSIDE, PLAYMODE_OUR_CORNER_KICK, PLAYMODE_OUR_FOUL, PLAYMODE_OUR_FREE_KICK, PLAYMODE_OUR_GOAL, PLAYMODE_OUR_GOAL_KICK, PLAYMODE_OUR_GOALIE_CATCH, PLAYMODE_OUR_KICK_IN, PLAYMODE_OUR_KICK_OFF, PLAYMODE_OUR_OFFSIDE, PLAYMODE_PLAY_ON, PLAYMODE_TIME_UP, PLAYMODES
 
Fields inherited from interface StrategyGeneralInterface
AUDIO_CUT_DIST, BALL_DECAY, BALL_RAND, BALL_SIZE, BALL_SPEED_MAX, BALL_WEIGHT, CATCH_BAN_CYCLE, CATCH_PROBABILITY, CATCHABLE_AREA_L, CATCHABLE_AREA_W, CKICK_MARGIN, DASH_POWER_RATE, EFFORT_DEC, EFFORT_DEC_THR, EFFORT_INC, EFFORT_INC_THR, EFFORT_MIN, FORMATION_244, FORMATION_433, FORMATION_541, FORMATION_CATENAGIO, FORMATIONS_NUM_OF, GOAL_CENTER_POINT, GOAL_WIDTH, HEAR_DECAY, HEAR_INC, HEAR_MAX, INERTIA_MOMENT, KICK_POWER_RATE, KICKABLE_AREA, KICKABLE_MARGIN, MAX_AUDIOINFO, MAX_DASH_PER_CYCLE, MAXMOMENT, MAXPOWER, MIN_STAMINA, MINMOMENT, MINPOWER, NECK, OFFSIDE_ACTIVE_AREA_SIZE, PENALTY_AREA_X_WIDTH, PENALTY_AREA_Y_WIDTH, PLAYER_DECAY, PLAYER_RAND, PLAYER_SIZE, PLAYER_SPEED_MAX, PLAYER_WEIGHT, PORT, RECOVER_DEC, RECOVER_DEC_THR, RECOVER_MIN, RECV_STEP, SEND_STEP, SENSE_BODY_STEP, SIMULATOR_STEP, SKILL_CENTER_EGDE_OF_VIEW, SKILL_CONST_SLOPE, SKILL_DEC_SLOPE, SKILL_DESTINATION_DASH, SKILL_DISTANCE_DASH, SKILL_DYNOBJ_DASH, SKILL_DYNOBJ_SHOOT, SKILL_FIX_ANGLE_TURN, SKILL_FIX_ANGLE_TURN_NECK, SKILL_HIGH_PRECISION, SKILL_INC_SLOPE, SKILL_INFINIT, SKILL_KOORD_SHOOT, SKILL_LEFT_EGDE_OF_VIEW, SKILL_LOW_PRECISION, SKILL_MEDIUM_PRECISION, SKILL_RIGHT_EGDE_OF_VIEW, SKILL_TO_COORDINATES_TURN, SKILL_TO_COORDINATES_TURN_NECK, SKILL_TO_DYNOBJ_TURN, STAMINA_INC_MAX, STAMINA_MAX, STRATEGIES, STRATEGY_FLAG_OPPGOAL, STRATEGY_FLAG_PUMP, STRATEGY_FLAG_TESTFLAG, VISIBLE_ANGLE
 
Fields inherited from interface DebugInterface
DEBUG_SWITCH_STRATEGY_IS_SET, DEBUG_SWITCH_VISUALISATION_IS_SET, DEBUG_SWITCH_WORLDMODEL_AUDIOEVENT_IS_SET, DEBUG_SWITCH_WORLDMODEL_BODYEVENT_IS_SET, DEBUG_SWITCH_WORLDMODEL_VISUALEVENT_IS_SET
 
Constructor Summary
StrategyManager(Player player)
          constructor
 
Method Summary
(package private)  void debug(java.lang.String id, java.lang.String msg)
           
 int findStrategyFromSituation()
          generates stategyFlag value after game situation analysis
 void generateTactics()
          generates tactics and stores the appropriate Tactic objects on the TacticsQueue
 java.lang.String getLastStrategyInfo()
          get the last message that was said from strategy from worldmodell
 int getStrategyFlag()
          returns the current strategy flag
 void relayStrategyFlag(java.lang.String message)
           
 void sendStrategyInfo()
           
 void setStrategyFlag(int strategyFlag)
          sets the current strategy flag
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

DEBUG

final boolean DEBUG

strategyFlag

private int strategyFlag
The strategyFlag attribute stores the current strategic game situation identifier (offensive game situation, defensive game situation, ...)
This identifier is essential to the generation of appropriate tactics.

player

private Player player
pointer to Player

formation

public Formation formation
the currently loaded formation

strategy

public Strategy strategy
the currently loaded strategy

lastCyclePlayMode

private int lastCyclePlayMode
playmode of last cycle
Constructor Detail

StrategyManager

public StrategyManager(Player player)
constructor
Parameters:
player - pointer to Player class instance of the client
Method Detail

findStrategyFromSituation

public int findStrategyFromSituation()
generates stategyFlag value after game situation analysis
Returns:
int strategic game situation identifier

generateTactics

public void generateTactics()
generates tactics and stores the appropriate Tactic objects on the TacticsQueue

relayStrategyFlag

public void relayStrategyFlag(java.lang.String message)

getLastStrategyInfo

public java.lang.String getLastStrategyInfo()
get the last message that was said from strategy from worldmodell
Returns:
String last message that was said from strategy from worldmodell

sendStrategyInfo

public void sendStrategyInfo()

getStrategyFlag

public int getStrategyFlag()
returns the current strategy flag
Returns:
strategic game situation identifier

setStrategyFlag

public void setStrategyFlag(int strategyFlag)
sets the current strategy flag
Parameters:
strategyFlag - strategy flag the is to be set

debug

void debug(java.lang.String id,
           java.lang.String msg)