fast response with no movement option
This commit is contained in:
parent
ac4c2d6f72
commit
f6845b5126
@ -126,7 +126,7 @@ pub fn get_move(
|
|||||||
game.ruleset.name == "constrictor",
|
game.ruleset.name == "constrictor",
|
||||||
);
|
);
|
||||||
let possible_actions = board.possible_actions().get(&game_info.my_token).cloned()?;
|
let possible_actions = board.possible_actions().get(&game_info.my_token).cloned()?;
|
||||||
if possible_actions.len() == 1 {
|
if possible_actions.len() <= 1 {
|
||||||
info!("Only one movement option exists in turn {turn}. Skipping Tree evaluation");
|
info!("Only one movement option exists in turn {turn}. Skipping Tree evaluation");
|
||||||
return possible_actions.first().map(|direction| Action {
|
return possible_actions.first().map(|direction| Action {
|
||||||
r#move: *direction,
|
r#move: *direction,
|
||||||
|
Loading…
Reference in New Issue
Block a user