Javascript implementation of the TicTacToe game