TicTacToe and Towers of Hanoi with jQuery