[][src]Struct babalcore::Level

pub struct Level { /* fields omitted */ }

Implementations

impl Level[src]

pub fn new(seed: u64, width: usize, skill: Skill) -> Level[src]

Create a new level, with a given size

Examples

use babalcore::*;

let _level = Level::new(0, 10, Skill::Easy);

pub fn width(&self) -> usize[src]

Get the level width. It is fixed for a given game session.

Examples

use babalcore::*;

let level = Level::new(0, 10, Skill::Easy);
assert_eq!(10, level.width());

pub fn len(&self) -> usize[src]

Get the level length. Length typically increases as the ball rolls on.

Examples

use babalcore::*;

let level = Level::new(0, 10, Skill::Easy);
assert_eq!(0, level.len());

pub fn push(&mut self, row: Row)[src]

pub fn extend(&mut self, n: usize)[src]

Trait Implementations

impl Display for Level[src]

Auto Trait Implementations

impl RefUnwindSafe for Level

impl Send for Level

impl Sync for Level

impl Unpin for Level

impl UnwindSafe for Level

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> ToString for T where
    T: Display + ?Sized
[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.