[−][src]Struct babalcore::Level
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
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]
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,
pub 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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
pub 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>,