A simple javascript implementation of tic tac toe