Created
August 26, 2010 09:20
-
-
Save erubboli/551129 to your computer and use it in GitHub Desktop.
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
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