Class: RubyArena::Level3Ai

Inherits:
Ai
  • Object
show all
Defined in:
lib/ruby_arena/levels/level3_ai.rb

Instance Attribute Summary

Attributes inherited from Ai

#command_parser, #robot

Instance Method Summary collapse

Methods inherited from Ai

#initialize

Constructor Details

This class inherits a constructor from RubyArena::Ai

Instance Method Details

#tick(events) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/ruby_arena/levels/level3_ai.rb', line 3

def tick(events)
  accelerate
  turn(6)
  if events[:scanned_robots].any?
    turn_gun(-10)
    fire
  end
end