Major amounts of progress
This commit is contained in:
30
src/dynamic_data/models/battle_random.rs
Normal file
30
src/dynamic_data/models/battle_random.rs
Normal file
@@ -0,0 +1,30 @@
|
||||
use crate::utils::random::Random;
|
||||
use std::fmt::{Debug, Formatter};
|
||||
|
||||
pub struct BattleRandom {
|
||||
random: Random,
|
||||
}
|
||||
|
||||
impl Debug for BattleRandom {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
|
||||
f.debug_struct("BattleRandom").finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl BattleRandom {
|
||||
pub fn new() -> Self {
|
||||
return BattleRandom {
|
||||
random: Default::default(),
|
||||
};
|
||||
}
|
||||
|
||||
pub fn new_with_seed(seed: u128) -> Self {
|
||||
return BattleRandom {
|
||||
random: Random::new(seed),
|
||||
};
|
||||
}
|
||||
|
||||
pub fn get_rng(&mut self) -> &mut Random {
|
||||
&mut self.random
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user