Tic Tac Toe using Javascript