Skip to main content

argumentation_schemes/
critical.rs

1//! Critical questions for argumentation schemes.
2
3use crate::types::Challenge;
4
5/// A critical question that probes a scheme's weak points.
6///
7/// Each Walton scheme carries 2-6 critical questions. When a character
8/// uses a scheme in an encounter, these become the available follow-up
9/// moves for the opposing party.
10#[derive(Debug, Clone, PartialEq, Eq)]
11pub struct CriticalQuestion {
12    /// Question number within the scheme (1-based).
13    pub number: u32,
14    /// Human-readable question text with `?slot` references.
15    pub text: String,
16    /// What aspect of the scheme this question challenges.
17    pub challenge: Challenge,
18}
19
20impl CriticalQuestion {
21    /// Convenience constructor.
22    pub fn new(number: u32, text: impl Into<String>, challenge: Challenge) -> Self {
23        Self {
24            number,
25            text: text.into(),
26            challenge,
27        }
28    }
29}
30
31#[cfg(test)]
32mod tests {
33    use super::*;
34
35    #[test]
36    fn critical_question_stores_challenge() {
37        let cq = CriticalQuestion::new(
38            1,
39            "Is ?expert really an expert in ?domain?",
40            Challenge::PremiseTruth("expert".into()),
41        );
42        assert_eq!(cq.number, 1);
43        assert!(cq.text.contains("?expert"));
44        assert!(matches!(cq.challenge, Challenge::PremiseTruth(_)));
45    }
46}