From 0d98f8e25e299c67b0c2293edefaef72dbf3fd52 Mon Sep 17 00:00:00 2001 From: Rhys Lloyd Date: Sat, 16 May 2026 10:35:11 -0700 Subject: [PATCH] validate other instructions --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 844bbb2..c64e5e9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -244,7 +244,10 @@ fn find_valid_instruction( KlondikePileId::Foundation4 => InstructionSrc::new(KlondikePileStack::Foundation4), KlondikePileId::Stock => InstructionSrc::new(KlondikePileStack::Stock), }; - return Some(KlondikeInstruction { src, dst }); + let instruction = KlondikeInstruction { src, dst }; + state + .is_instruction_valid(instruction) + .then_some(instruction) } fn main() -> Result<(), std::io::Error> {