Fix some errors and add game unittest.
Keep track of who played and who's playing.