diff options
author | metamuffin <metamuffin@disroot.org> | 2024-08-11 19:22:29 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-08-11 19:22:29 +0200 |
commit | 98ac3be875a30ad97162949aa929c7363d0bf2b3 (patch) | |
tree | 028ab01c471ca4d13ab659a7d5b9fd3a45a03e90 /server/bot/src/algos/test.rs | |
parent | 012fbc3e6382a92de60a191690000b0e83653cc6 (diff) | |
download | hurrycurry-98ac3be875a30ad97162949aa929c7363d0bf2b3.tar hurrycurry-98ac3be875a30ad97162949aa929c7363d0bf2b3.tar.bz2 hurrycurry-98ac3be875a30ad97162949aa929c7363d0bf2b3.tar.zst |
improve framework and start work on simple algo
Diffstat (limited to 'server/bot/src/algos/test.rs')
-rw-r--r-- | server/bot/src/algos/test.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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); } } |