I needed a simple Tic Tac Toe game for a easter egg in one of our products, but all games out there are a horrible code mess (think html 3.0 style *urgs* with js calls everywhere and inline styles *urgs*) so i took the best one and refactored all js/css out of the code, and here it is, still ugly code, but it will keep your namespace clean!
Have fun!