summaryrefslogtreecommitdiff
path: root/server/bot/src/lib.rs
blob: e8f05fd6e957feb9f218b53998372035c5bad243 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![feature(isqrt)]
pub mod algos;
pub mod pathfinding;

use hurrycurry_client_lib::Game;
use hurrycurry_protocol::{
    glam::{IVec2, Vec2},
    PlayerID,
};

#[derive(Default, Clone, Copy)]
pub struct BotInput {
    pub direction: Vec2,
    pub boost: bool,
    pub interact: Option<IVec2>,
}
pub trait BotAlgo {
    fn tick(&mut self, me: PlayerID, game: &Game, dt: f32) -> BotInput;
}