class Object

Public Instance Methods

agent(argument = :agent)
Alias for: agent_model
agent_model(argument = :agent) click to toggle source
# File extensions/globals.rb, line 1
def agent_model argument = :agent
  model = Java::sk.fiit.jim.agent.models.AgentModel::instance
  return model.position if argument == :position
  return model.rotation_x if argument == :rotation_x
  return model.rotation_y if argument == :rotation_y
  return model.rotation_z if argument == :rotation_z
  model
end
Also aliased as: i, me, my, mine, agent
ball(argument = :ball) click to toggle source
# File extensions/globals.rb, line 16
def ball argument = :ball
  ball = Java::sk.fiit.jim.agent.models.WorldModel::instance.ball
  return ball.position if argument == :position
  return ball.relative_position if argument == :relative_position
  ball
end
cartesian(x, y, z) click to toggle source
# File extensions/globals.rb, line 23
def cartesian x, y, z
  Vector3D::cartesian x, y, z
end
debug(message = "") click to toggle source
# File config/log.rb, line 25
def debug message = ""
  Log.debug LogType::HIGH_SKILL, message
end
environment(argument = :environment) click to toggle source
# File extensions/globals.rb, line 31
def environment argument = :environment
  return Java::sk.fiit.jim.agent.models.EnvironmentModel.PLAY_MODE if argument == :play_mode
  return Java::sk.fiit.jim.agent.models.EnvironmentModel.SIMULATION_TIME if argument == :time
  Java::sk.fiit.jim.agent.models.EnvironmentModel::instance
end
error(message = "") click to toggle source
# File config/log.rb, line 29
def error message = ""
  Log.error LogType::HIGH_SKILL, message
end
from(argument)
Alias for: to
i(argument = :agent)
Alias for: agent_model
log(message = "") click to toggle source
# File config/log.rb, line 21
def log message = ""
  Log.log LogType::HIGH_SKILL, message
end
me(argument = :agent)
Alias for: agent_model
method_missing(name, *args) click to toggle source
# File extensions/nil.rb, line 9
def method_missing name, *args
  puts "Method #{name} called on #{self.class.name}. At: #{caller[0]}"
  puts "Defined methods: #{self.class.instance_methods.join "\n"}"
  raise "Method #{name} called on #{self.class.name}. At: #{caller[0]}"
end
mine(argument = :agent)
Alias for: agent_model
my(argument = :agent)
Alias for: agent_model
near(argument)
Alias for: to
next(argument)
Alias for: to
play_mode() click to toggle source
# File extensions/globals.rb, line 37
def play_mode
  :play_mode
end
position() click to toggle source
# File extensions/globals.rb, line 48
def position
  :position
end
relative(argument) click to toggle source

argument is here only to shut up errors like 1 argument get, expected 0 if a call “my relative position” occurs

# File extensions/globals.rb, line 54
def relative argument
  :relative_position
end
spherical(r, phi, theta) click to toggle source
# File extensions/globals.rb, line 27
def spherical r, phi, theta
  Vector3D::spherical r, phi, theta
end
time() click to toggle source
# File extensions/globals.rb, line 41
def time
  :time
end
to(argument) click to toggle source
# File extensions/globals.rb, line 58
def to argument
  argument
end
Also aliased as: from, next, near