lib/engine.js
function choiceListener(index) {
  return function (event) {
    event.preventDefault();
    if (choicesAnimating) return;
    clearChoiceListeners();
    story.ChooseChoiceIndex(index);
    saveGame(index);
    clearOldChoices().then(() => progressGame());
  }
}
function choiceListener(index) {
  return function (event) {
    event.preventDefault();
    if (choicesAnimating) return;
    clearChoiceListeners();
    story.ChooseChoiceIndex(index);
    saveGame(index);
    clearOldChoices().then(() => progressGame());
  }
}
function choiceListener ( index ) { return function ( event ) { event . preventDefault ( ) ; if ( choicesAnimating ) return ; clearChoiceListeners ( ) ; story . ChooseChoiceIndex ( index ) ; saveGame ( index ) ; clearOldChoices ( ) . then ( ( ) => progressGame ( ) ) ; } }
Create a listener function to attach to one of the li elements that represents a player choice.
Create a listener function to attach to one of the li elements that represents a player choice .