[][src]Struct movingai::MovingAiMap

pub struct MovingAiMap { /* fields omitted */ }

An immutable representation of a MovingAI map.

Methods

impl MovingAiMap[src]

pub fn new(
    map_type: String,
    height: usize,
    width: usize,
    map: Vec<char>
) -> MovingAiMap
[src]

Create a new MovingAIMap object from basic components.

Arguments

  • map_type: The type of map you are registering. Usually octile.
  • height: the height of the map.
  • width: the width of the map.
  • map: A vector representing the map in row-major order.

Panics

The new call will panic id the size of the map vector is different from heigth*width.

Trait Implementations

impl Debug for MovingAiMap[src]

impl Index<(usize, usize)> for MovingAiMap[src]

type Output = char

The returned type after indexing.

impl Map2D<char> for MovingAiMap[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.