class Rubots::Command::RotateGunTo
Public Class Methods
new(angle)
click to toggle source
# File lib/rubots/command/rotate_gun_to.rb, line 4 def initialize(angle) @angle = angle % Robot::MAX_GUN_ANGLE end
Public Instance Methods
apply_to(robot)
click to toggle source
# File lib/rubots/command/rotate_gun_to.rb, line 8 def apply_to(robot) robot.desired_gun_angle = @angle end