XO game written on JS