# 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
# 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
# File extensions/globals.rb, line 23 def cartesian x, y, z Vector3D::cartesian x, y, z end
# File config/log.rb, line 25 def debug message = "" Log.debug LogType::HIGH_SKILL, message end
# 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
# File config/log.rb, line 29 def error message = "" Log.error LogType::HIGH_SKILL, message end
# File config/log.rb, line 21 def log message = "" Log.log LogType::HIGH_SKILL, message end
# 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
# File extensions/globals.rb, line 37 def play_mode :play_mode end
# File extensions/globals.rb, line 48 def position :position end
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
# File extensions/globals.rb, line 27 def spherical r, phi, theta Vector3D::spherical r, phi, theta end
# File extensions/globals.rb, line 41 def time :time end