UPDATE: Thanks for everyone who emailed their help. I'll leave this post up here for now, but the code seems fairly solid now.
I'm currently looking for help editing the source code for the games that will go into my next book. This book will also be released under a Creative Commons license and be freely available.
Download the game source. (Requires Python & Pygame)
UPDATE: I've fixed a problem where the midi files for the Tetris game were left out of this zip. Redownload the zip file to get them.