Class: RubyArena::Ai
- Inherits:
-
Object
- Object
- RubyArena::Ai
- Defined in:
- lib/ruby_arena/ai.rb
Instance Attribute Summary collapse
-
#command_parser ⇒ Object
readonly
Returns the value of attribute command_parser.
-
#robot ⇒ Object
readonly
Returns the value of attribute robot.
Instance Method Summary collapse
-
#initialize(args) ⇒ Ai
constructor
A new instance of Ai.
- #tick ⇒ Object
Constructor Details
#initialize(args) ⇒ Ai
Returns a new instance of Ai.
5 6 7 8 |
# File 'lib/ruby_arena/ai.rb', line 5 def initialize(args) @robot = args.fetch(:robot) @command_parser = args.fetch(:command_parser) end |
Instance Attribute Details
#command_parser ⇒ Object (readonly)
Returns the value of attribute command_parser.
3 4 5 |
# File 'lib/ruby_arena/ai.rb', line 3 def command_parser @command_parser end |
#robot ⇒ Object (readonly)
Returns the value of attribute robot.
3 4 5 |
# File 'lib/ruby_arena/ai.rb', line 3 def robot @robot end |
Instance Method Details
#tick ⇒ Object
10 11 12 |
# File 'lib/ruby_arena/ai.rb', line 10 def tick raise NotImplementedError, 'Your robot should implement tick method' end |