Class: Rubygoal::AveragePlayer
- Defined in:
- lib/rubygoal/players/average.rb
Constant Summary
Constants included from Moveable
Instance Attribute Summary
Attributes included from Moveable
Instance Method Summary collapse
-
#initialize(*args) ⇒ AveragePlayer
constructor
A new instance of AveragePlayer.
Methods inherited from Player
#can_kick?, #draw, #kick, #update
Methods included from Moveable
#distance, #move_to, #moving?, #update
Constructor Details
#initialize(*args) ⇒ AveragePlayer
Returns a new instance of AveragePlayer.
3 4 5 6 7 |
# File 'lib/rubygoal/players/average.rb', line 3 def initialize(*args) super @error = 0.10 + Random.rand(0.05) @speed = 3.5 end |