changed ticTactoe function to check for endGame instead of reset