cat /dev/brain/rand > /srv/tumblr

Mar 06 2011

Dealing bridge hands

Last night I wrote a little program to deal random bridge hands. It does a Knuth shuffle using /dev/random as the RNG, sorts each player’s hand, and then prints them out. It can either pretty print the hands or output in PBN. It’s not terribly fast due to /dev/random, which is limited to a few hundred bits a second, but consequently it should generate pretty good deals.

It’s written for plan 9 but it should compile easily under plan 9 port using 9c and 9l.

1 note

  1. jbedo posted this
Page 1 of 1