Class: Rubygoal::FastPlayer
- Defined in:
- lib/rubygoal/players/fast.rb
Constant Summary
Constants inherited from Player
Constants included from Moveable
Instance Attribute Summary
Attributes inherited from Player
#coach_defined_position, #name, #side, #type
Attributes included from Moveable
#destination, #position, #rotation, #velocity
Instance Method Summary collapse
-
#initialize(*args) ⇒ FastPlayer
constructor
A new instance of FastPlayer.
Methods inherited from Player
#can_kick?, #kick, #move_to_coach_position, #update
Methods included from Moveable
#distance, #move_to, #moving?, #position_after_update, #stop, #update
Constructor Details
#initialize(*args) ⇒ FastPlayer
Returns a new instance of FastPlayer.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/rubygoal/players/fast.rb', line 5 def initialize(*args) super config = Rubygoal.configuration error_range = config.fast_lower_error..config.fast_upper_error @error = Random.rand(error_range) @speed = config.fast_speed @type = :fast end |