#[repr(C)]
#[repr(align(4))]
pub struct IpcSelfInfo { pub segment_radius: f32, pub mass: f32, pub sight_radius: f32, pub consume_radius: f32, pub start_frame: u32, pub current_frame: u32, pub speed: f32, pub max_step_angle: f32, pub consumed_natural_food: f32, pub consumed_food_hunted_by_self: f32, pub consumed_food_hunted_by_others: f32, }
Expand description

IPC representation of one’s own snake and current world parameters.

Fields

segment_radius: f32

Radius of your snake’s segments

mass: f32

Your Snake’s current mass

sight_radius: f32

Radius around your snake’s head in which you can see food and segments

consume_radius: f32

Radius around your snake’s head in which food is consumed.

start_frame: u32

Frame number when your snake was spawned

current_frame: u32

Current frame number

speed: f32

Distance per step

max_step_angle: f32

Maximum direction change in this step

consumed_natural_food: f32

Amount of “naturally” spawned food your snake consumed

consumed_food_hunted_by_self: f32

Amount of food you consumed and that was created from snakes you killed

consumed_food_hunted_by_others: f32

Amount of food you consumed and that was created from snakes others killed (carrion)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.