Hiyve Components - v1.0.0
    Preparing search index...

    Function answerTrail

    • The trail with the current card answered. Right: the die is rolled, the piece moves, and any shortcut on the space it lands on is taken — unless the piece is in a trap, when a right answer only counts towards getting out: a wait trap lets it go after turns right answers, a roll trap when the die shows the number asked or on the third failed roll, and that roll moves it. Landing on a trap catches it. Wrong (and not kept open for another go): the piece stays. Either way the next card comes up, and the trail is finished at the last space or the last card.

      Parameters

      • state: TrailState
      • answer: GameAnswer
      • elapsedMs: number | null = null
      • keepOpenWhenWrong: boolean = false

      Returns TrailState