JavaScript implementation of the TicTacToe game