Skip to content

Instantly share code, notes, and snippets.

View jordanpoulton's full-sized avatar

Jordan Poulton jordanpoulton

View GitHub Profile
@jordanpoulton
jordanpoulton / team_picker.rb
Created February 27, 2013 18:52
Give it a few weeks and we'll be selling this to Premier League clubs ;)
#!/usr/bin/env ruby
class Manager
def initialize
puts "Manager initialised"
end
def pick_a_team(squad, d, m, a)
team = Team.new
@jordanpoulton
jordanpoulton / cake.rb
Created February 27, 2013 18:05
A programme that bakes an Umbongo flavoured cake then bakes one for you...
#!/usr/bin/env ruby
class Order
def initialize(cake_flavour)
puts "----------------->You've initialised a new order for a cake"
puts "
You want a #{cake_flavour} flavoured cake?
#!/usr/bin/env ruby
class Manager
def pick_a_team(squad)
team = Team.new
# get the best players for every position from the squad
# and add them to the team
# for every position (goalkeeper etc)
# get the best player(s) from the squad