Class: Rubygoal::AwayTeam
Constant Summary
Constants inherited from Team
Instance Attribute Summary
Attributes inherited from Team
#coach, #formation, #opponent_side, #players, #side
Instance Method Summary collapse
-
#initialize(*args) ⇒ AwayTeam
constructor
A new instance of AwayTeam.
- #teammate_is_on_front?(player, teammate) ⇒ Boolean
Methods inherited from Team
#players_list, #players_position, #players_to_initial_position, #update
Constructor Details
#initialize(*args) ⇒ AwayTeam
Returns a new instance of AwayTeam.
5 6 7 8 9 |
# File 'lib/rubygoal/teams/away.rb', line 5 def initialize(*args) @side = :away @opponent_side = :home super end |
Instance Method Details
#teammate_is_on_front?(player, teammate) ⇒ Boolean
11 12 13 |
# File 'lib/rubygoal/teams/away.rb', line 11 def teammate_is_on_front?(player, teammate) teammate.position.x < player.position.x - 40 end |