function onGameEnd(gameCount, totalGames) {
  iterationStatus.textContent = `Game ${gameCount} of ${totalGames}`;
  iterationProgress.value = gameCount / totalGames * 100;
  if (gameCount === totalGames) {
    iterationStatus.textContent = 'Updating weights...';
  }
}
A function invoked at the end of every game during training.

@param {number} gameCount A count of how many games has completed so far in
  the current iteration of training.
@param {number} totalGames Total number of games to complete in the current
  iteration of training.