Javascript Tic Tac Toe game