Trait rlbot::Bot[][src]

pub trait Bot {
    fn set_player_index(&mut self, index: usize);
fn tick(&mut self, packet: &LiveDataPacket) -> PlayerInput; }

A bot that can run within the RLBot framework. Instances of Bot are used by the run_bot function.

Example

See examples/bot for a complete example.

Required Methods

This method is called when the bot's player index changes. The player index is the index in the LiveDataPacket::GameCars array which is under this Bot's control. This method is guaranteed to be called before the first call to tick.

This is called whenever there is a new game state. Your car will be controlled according to the PlayerInput you return.

Implementors