jan qui ne peut

This commit is contained in:
Henri Bourcereau 2024-05-24 19:23:04 +02:00
parent 152d2673f7
commit b528fa3ac6
2 changed files with 105 additions and 93 deletions

View file

@ -367,6 +367,7 @@ impl Board {
dice: u8,
with_excedants: bool,
check_rest_corner_exit: bool,
forbid_exits: bool,
) -> Vec<CheckerMove> {
let mut moves = Vec::new();
@ -388,8 +389,11 @@ impl Board {
continue;
}
let mut dest = get_dest(field as i32);
if dest == 0 && forbid_exits {
continue;
}
if !(0..25).contains(&dest) {
if with_excedants {
if with_excedants && !forbid_exits {
dest = 0;
} else {
continue;