From 98ac3be875a30ad97162949aa929c7363d0bf2b3 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 11 Aug 2024 19:22:29 +0200 Subject: improve framework and start work on simple algo --- server/bot/src/algos/test.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/bot/src/algos/test.rs') diff --git a/server/bot/src/algos/test.rs b/server/bot/src/algos/test.rs index 17999f5e..d17b079d 100644 --- a/server/bot/src/algos/test.rs +++ b/server/bot/src/algos/test.rs @@ -1,5 +1,5 @@ use crate::{ - pathfinding::{find_path, Path}, + pathfinding::{find_path_to_neighbour, Path}, BotAlgo, BotInput, }; use hurrycurry_client_lib::Game; @@ -28,7 +28,7 @@ impl BotAlgo for Test { } else { if let Some((item, near)) = find_demand(game) { info!("demand {item:?} near {near}"); - if let Some(path) = find_path(&game.walkable, pos.as_ivec2(), near) { + if let Some(path) = find_path_to_neighbour(&game.walkable, pos.as_ivec2(), near) { self.path = Some(path); } } -- cgit v1.2.3-70-g09d2