class PlanTournamentFreeRide

planTournamentFreeRide.rb ###

@author: A55Kickers                   #

Public Instance Methods

replan() click to toggle source
# File plan/planTournamentFreeRide.rb, line 7
def replan
  @plan.clear
  @agentInfo.whereIsBall();
  @agentInfo.isBallMine();
  @agentInfo.nearBall();
  @agentInfo.ballControlPosition();
  @agentInfo = Java::sk.fiit.jim.agent.AgentInfo.getInstance
      
  if EnvironmentModel.beamablePlayMode
      @agentInfo.loguj('Beam');
      @plan << Beam.new(Java::sk.fiit.robocup.library.geometry.Vector3D.cartesian(-2, 3, 0.4))
      @beamed = true
  elsif (me.on_ground? or me.is_lying_on_back? or me.is_lying_on_belly?)
      @agentInfo.loguj('GetUp');
      @plan << GetUp.new(Proc.new{me.on_ground?})
      else
      @agentInfo.loguj('Free Ride');
      @plan << FreeRide.new
  end
end