[][src]Struct mc_sim::run::RunSim

pub struct RunSim<'a, 'b> { /* fields omitted */ }

A Minecraft speed run simulation.

Implementations

impl<'a, 'b> RunSim<'a, 'b>[src]

pub fn new(
    barter_drop_sim: &'a mut DropSim,
    blaze_drop_sim: &'b mut DropSim,
    pearl_target: u32,
    rods_target: u32
) -> Self
[src]

Creates a minecraft speed run simulator.

let mut barter_drop_sim = DropSim::new(drop_list::barter_drop_list(10, 10).list_clone());
let mut blaze_drop_sim = DropSim::new(drop_list::blaze_drop_list(7).list_clone());

let mut run_sim = RunSim::new(&mut barter_drop_sim, &mut blaze_drop_sim, 10, 7);
let run = run_sim.run();
assert!(run.total_pearls() >= 10);
assert!(run.total_rods() >= 7);

pub fn run(&mut self) -> Run[src]

Simulate a run.

pub fn barter_for_pearls(&mut self) -> Vec<Drop>[src]

Barter for pearls until the pearl target is reached.

pub fn fight_for_rods(&mut self) -> Vec<Drop>[src]

Fight blazes until the rod target is reached.

pub fn farm_for_item(
    drop_sim: &mut DropSim,
    item: Item,
    minimum: u32
) -> Vec<Drop>
[src]

Farm for an item from a drop simulator with a minimum target before we're done.

Trait Implementations

impl<'a, 'b> Debug for RunSim<'a, 'b>[src]

Auto Trait Implementations

impl<'a, 'b> !RefUnwindSafe for RunSim<'a, 'b>[src]

impl<'a, 'b> !Send for RunSim<'a, 'b>[src]

impl<'a, 'b> !Sync for RunSim<'a, 'b>[src]

impl<'a, 'b> Unpin for RunSim<'a, 'b>[src]

impl<'a, 'b> !UnwindSafe for RunSim<'a, 'b>[src]

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> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,