Got most of the game in, but the computer move algorithm is perfectly faithful.
Final version plus notes.