validate other instructions

This commit is contained in:
2026-05-16 10:35:11 -07:00
parent 8fe13caa1e
commit 0d98f8e25e
+4 -1
View File
@@ -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> {