From d3abaf61a7c99a8b103e587ecc528620d09c37b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20K=C3=A4nner?= Date: Wed, 22 Jan 2025 01:00:29 +0100 Subject: [PATCH] use division remainder as second criterion --- battlesnake/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/battlesnake/src/main.rs b/battlesnake/src/main.rs index 608e341..eb3c428 100644 --- a/battlesnake/src/main.rs +++ b/battlesnake/src/main.rs @@ -107,7 +107,7 @@ async fn get_move(request: Json) -> response::Json { let action = actions.into_iter().max_by_key(|action| { let action_data = action_data[usize::from(*action)]; - action_data.0 / action_data.1 + (action_data.0 / action_data.1, action_data.0 % action_data.1) }); if let Some(action) = action {