JS version of tic tac toe