[−][src]Struct mc_sim::stream::Stream
A single 'stream' of minecraft speed runs. I.E. A list of speed runs.
Fields
runs: Vec<Run>
goals: Vec<RunGoals>
Implementations
impl Stream
[src]
pub fn simulate(
barter_drop_sim: &mut DropSim,
blaze_drop_sim: &mut DropSim,
goals: Vec<RunGoals>
) -> Self
[src]
barter_drop_sim: &mut DropSim,
blaze_drop_sim: &mut DropSim,
goals: Vec<RunGoals>
) -> Self
Simulate the stream from drop lists for bartering and blazes, and a list of goals per run.
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 goals = vec![ RunGoals { target_pearls: 10, target_rods: 7 }, RunGoals { target_pearls: 10, target_rods: 6 }, RunGoals { target_pearls: 10, target_rods: 8 }, RunGoals { target_pearls: 10, target_rods: 7 }, ]; let stream = Stream::simulate(&mut barter_drop_sim, &mut blaze_drop_sim, goals); assert!(stream.total_pearls() >= 40); assert!(stream.total_rods() >= 28); assert_eq!(stream.runs.len(), 4); assert!(stream.runs[2].total_rods() >= 8);
pub fn total_barters(&self) -> u32
[src]
The total number of barters made across all runs in the stream.
pub fn successful_barters(&self) -> u32
[src]
pub fn total_pearls(&self) -> u32
[src]
The total number of pearls picked up across all runs in the stream.
pub fn total_fights(&self) -> u32
[src]
The total number of blazes killed across all runs in the stream.
pub fn successful_fights(&self) -> u32
[src]
pub fn total_rods(&self) -> u32
[src]
The total number of blaze rods picked up across all runs in the stream.
pub fn results(&self) -> StreamResults
[src]
A summary of the results of the stream.
Trait Implementations
impl Clone for Stream
[src]
impl Debug for Stream
[src]
impl<'de> Deserialize<'de> for Stream
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Stream
[src]
Auto Trait Implementations
impl RefUnwindSafe for Stream
[src]
impl Send for Stream
[src]
impl Sync for Stream
[src]
impl Unpin for Stream
[src]
impl UnwindSafe for Stream
[src]
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub unsafe fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,