Created
December 4, 2009 20:03
-
-
Save ignu/249310 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
dealer.player = false | |
add_round do | |
players.each {|p| p.bet} | |
deal players 1.up | |
deal dealer 1.down | |
deal all 1.up | |
end | |
add_round do | |
players.each{ |p| p.act } | |
dealer.act | |
end | |
Player.actions do | |
bet do |amount| | |
player.pot += amount | |
end | |
hit do | |
deal player 1.up | |
end | |
double_down do | |
bet player.pot | |
hit | |
end | |
split do |s| | |
#ugh, this is going to be hard. :( | |
end | |
end | |
dealer.turn do | |
deal dealer 1.up until dealer.hand.total >= 17 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment