A simple tic-tac-toe written in pure Javascipt