Tic Tac Toe game in javascript