From da6b02acf20a0dcfad0c3b7dc4e1ce6d57298156 Mon Sep 17 00:00:00 2001 From: Henri Bourcereau Date: Wed, 25 Feb 2026 15:56:54 +0100 Subject: [PATCH] fix: training : exit board moves --- store/src/training_common.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/store/src/training_common.rs b/store/src/training_common.rs index 86f03ae..6427ea4 100644 --- a/store/src/training_common.rs +++ b/store/src/training_common.rs @@ -117,6 +117,10 @@ impl TrictracAction { .get_checker_field(color, *checker1 as u8) .unwrap_or(0); let mut to1 = from1 + dice1 as usize; + if 24 < to1 { + // exit board + to1 = 0; + } let checker_move1 = CheckerMove::new(from1, to1).unwrap_or_default(); let mut tmp_board = state.board.clone(); @@ -129,6 +133,10 @@ impl TrictracAction { .get_checker_field(color, *checker2 as u8) .unwrap_or(0); let mut to2 = from2 + dice2 as usize; + if 24 < to2 { + // exit board + to2 = 0; + } // Gestion prise de coin par puissance let opp_rest_field = 13;