JavaScript tic tac toe game