TicTacToe game written in Javascript