http://www.dave.burt.id.au/poker.rb

(requires card.rb in the same directory)

An explanation (and comments) will come later tonight.

Cheers,
Dave