2008/10/22 Erin Hodgess <[EMAIL PROTECTED]>: > This is for programming purposes. > > I wanted my students to do some games, but I wanted to see if there > were items already out there.
A quick googling (oooh, if ONLY R was called something more googly!) found Duncan Murdoch's poker package: http://www.stats.uwo.ca/faculty/murdoch/repos/html/pokerv0.0.html v0.0 could give your students something to start on. It has some card handling and shuffling packages as well as hand evaluations. Here's my poker calculator: action = function(hand, bet, cash){ if(rubbish(hand)){ drink() ; drink() if(drunk()) { return(bluff) }else{ return(fold) } } else { drink() bet = runif(1,min,max) return(bet) } } It's a pretty accurate simulation. *hic* Barry ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.