[−][src]Struct cellwars::WorldState
The state of the game's world.
Implementations
impl WorldState
[src]
pub fn width(&self) -> u32
[src]
The width of the world, in number of squares.
pub fn height(&self) -> u32
[src]
The height of the world, in number of squares.
pub fn my_team_id(&self) -> u32
[src]
The identifier of your bot's team. Use this to differentiate between your cells and your enemy's.
pub fn my_starting_column(&self) -> u32
[src]
The index of the column in which your cells spawn. This will typically be either 0 or width - 1.
pub fn enemy_starting_column(&self) -> u32
[src]
The index of the column in which your enemy's cells spawn. This will typically be either 0 or width - 1.
pub fn my_cells(&self) -> Vec<&Cell>
[src]
Gets all of the cells you currently control
pub fn enemy_cells(&self) -> Vec<&Cell>
[src]
Gets all of the cells the enemy currently controls
Trait Implementations
impl Default for WorldState
[src]
fn default() -> WorldState
[src]
Auto Trait Implementations
impl RefUnwindSafe for WorldState
impl Send for WorldState
impl Sync for WorldState
impl Unpin for WorldState
impl UnwindSafe for WorldState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,