Skip to content

Instantly share code, notes, and snippets.

@erubboli
Created August 26, 2010 09:20
Show Gist options
  • Save erubboli/551129 to your computer and use it in GitHub Desktop.
Save erubboli/551129 to your computer and use it in GitHub Desktop.
class Poker
def initialize(game)
@game = game
end
def evaluate_cards
#...
@game.primitive_operation
#...
end
end
class OmahaStrategy
def primitive_operation
#...
end
end
class TexasStrategy
def primitive_operation
#...
end
end
omaha_game = Poker.new(OmahaStrategy)
texas_game = Poker.new(TexasStrategy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment