Add CLI for networking

This commit is contained in:
Michael Bradley 2025-05-24 13:22:47 -04:00
parent 62da4093ea
commit b7804bd547
Signed by: MichaelBradley
SSH key fingerprint: SHA256:o/aaeYtRubILK7OYYjYP12DmU7BsPUhKji1AgaQ+ge4
3 changed files with 37 additions and 9 deletions

View file

@ -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 {