Class: Rubygoal::AveragePlayer

Inherits:
Player
  • Object
show all
Defined in:
lib/rubygoal/players/average.rb

Constant Summary

Constants included from Moveable

Moveable::MIN_DISTANCE

Instance Attribute Summary

Attributes included from Moveable

#position, #velocity

Instance Method Summary collapse

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