Finished TTT and reversi logic