Javascript Hanoi and TicTacToe