Created
November 26, 2010 07:14
-
-
Save cdave1/716376 to your computer and use it in GitHub Desktop.
Noodling around with an idea, code is unfinished...
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
struct card { short suit, short value } | |
struct player { card first, card second } | |
struct middle { card flop1, card flop2, card flop3, card turn, card river } | |
player players[ ] | |
int my_position | |
card cards[52] | |
int cardCount | |
fun start(playerCount) | |
cards <- generate cards | |
players <- generatePlayers(playerCount) | |
my_position <- rand() % playerCount | |
end | |
fun iter() | |
cardCount = 52 | |
# players hand don't change for each iteration | |
players[my_position].first <- cards[rand() % cardCount--] | |
players[my_position].second <- cards[rand() % cardCount--] | |
for each other player: | |
otherPlayer.first <- cards[rand() % cardCount--] | |
otherPlayer.second <- cards[rand() % cardCount--] | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment