Class: RubyArena::RobotRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_arena/robot_renderer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ RobotRenderer

Returns a new instance of RobotRenderer.



5
6
7
8
# File 'lib/ruby_arena/robot_renderer.rb', line 5

def initialize(args)
  @robot = args.fetch(:robot)
  @window = args.fetch(:window)
end

Instance Attribute Details

#robotObject (readonly)

Returns the value of attribute robot.



3
4
5
# File 'lib/ruby_arena/robot_renderer.rb', line 3

def robot
  @robot
end

#windowObject (readonly)

Returns the value of attribute window.



3
4
5
# File 'lib/ruby_arena/robot_renderer.rb', line 3

def window
  @window
end

Instance Method Details

#drawObject



10
11
12
13
14
# File 'lib/ruby_arena/robot_renderer.rb', line 10

def draw
  draw_tank_body
  draw_gun
  draw_radar
end