class GetUp

Public Class Methods

new(validity_proc) click to toggle source
Calls superclass method RubyHighSkill.new
# File high_skills/get_up.rb, line 5
def initialize validity_proc
  super()
  @validity_proc = validity_proc
  @agentInfo = Java::sk.fiit.jim.agent.AgentInfo.getInstance
  @agentModel = Java::sk.fiit.jim.agent.models.AgentModel.getInstance
end

Public Instance Methods

checkProgress() click to toggle source
# File high_skills/get_up.rb, line 33
def checkProgress
  #do nothing
end
pickLowSkill() click to toggle source
# File high_skills/get_up.rb, line 12
def pickLowSkill
  @agentModel.gotUp
  #return nil if not @validity_proc.call
  
  if me.lying_on_back? 
    puts "on back"
      return get_skill("stand_back")
  elsif me.lying_on_belly?
    puts "on belly"
      return get_skill("stand_front")
  elsif(!me.on_ground?)
    puts "standing"
    return nil
  else
    puts "dont know"
      return get_skill("stand_back")
  end
  

end