Tic-Tac-Toe game in Javascript