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