A 2 player console based tic tac toe in javascript