Skip to main content

cq_to_beat

Function cq_to_beat 

Source
pub fn cq_to_beat(
    cq: &CriticalQuestionInstance,
    challenger: &str,
    effects: Vec<Effect>,
) -> Beat
Expand description

Convert a single [CriticalQuestionInstance] into an encounter [Beat].

The beat’s action is formatted as "cq<number>:<text>" so that both the question index and its resolved text are visible in logs and tests.

§Arguments

  • cq - The critical question instance to convert.
  • challenger - The name of the character posing the challenge.
  • effects - Effects to attach to the beat (caller-supplied).