This is the Poker program from Peter Norvig's Udacity course. There's both a Python and a Racket version