ugly as hell (code, because the game itself is quite nice) tic tac toe