[][src]Trait rlbot::Bot

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

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

fn set_player_index(&mut self, index: usize)

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.

fn tick(&mut self, packet: &GameTickPacket) -> ControllerState

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

Loading content...

Implementors

Loading content...