Add CLI for networking
This commit is contained in:
parent
62da4093ea
commit
b7804bd547
3 changed files with 37 additions and 9 deletions
|
@ -1,11 +1,18 @@
|
|||
use std::hash::{DefaultHasher, Hash, Hasher};
|
||||
|
||||
use bevy::prelude::*;
|
||||
use rand::random;
|
||||
|
||||
/// Value with which to initialize the PRNG
|
||||
#[derive(Clone, Resource)]
|
||||
pub struct Seed(u64);
|
||||
|
||||
impl Seed {
|
||||
pub fn random() -> Self {
|
||||
Self(random())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<String> for Seed {
|
||||
/// Attempt to parse as an integer, fall back to hashing string
|
||||
fn from(value: String) -> Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue