-
-
Save ellisandrews/c1d513ce9413aa480183f1e45679ca72 to your computer and use it in GitHub Desktop.
Soccer object initialization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a couple teams | |
manchester_united = Team.new('Manchester United', 'Old Trafford') | |
liverpool_fc = Team.new('Liverpool FC', 'Anfield') | |
# Create a few Manchester United players | |
wayne_rooney = Player.new('Wayne Rooney', 8, manchester_united) | |
ryan_giggs = Player.new('Ryan Giggs', 11, manchester_united) | |
david_beckham = Player.new('David Beckham', 7, manchester_united) | |
# Create a few Liverpool players | |
steven_gerrard = Player.new('Steven Gerrard', 17, liverpool_fc) | |
michael_owen = Player.new('Michael Owen', 10, liverpool_fc) | |
fernando_torres = Player.new('Fernando Torres', 9, liverpool_fc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment