Class: Rubygoal::CaptainPlayer

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

Constant Summary

Constants inherited from Player

Player::STRAIGHT_ANGLE

Constants included from Moveable

Moveable::MIN_DISTANCE

Instance Attribute Summary

Attributes inherited from Player

#coach_defined_position, #side, #type

Attributes included from Moveable

#destination, #position, #rotation, #velocity

Instance Method Summary collapse

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) ⇒ CaptainPlayer

Returns a new instance of CaptainPlayer.



5
6
7
8
9
10
11
12
13
# File 'lib/rubygoal/players/captain.rb', line 5

def initialize(*args)
  super
  config = Rubygoal.configuration

  @error = config.captain_error
  @speed = config.captain_speed

  @type = :captain
end