Moved the state out to a different file
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use legion::prelude::*;
|
||||
use rand::prelude::*;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::state::Object;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
struct Name {
|
||||
@@ -23,13 +24,6 @@ pub struct Simulation {
|
||||
world: World
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize)]
|
||||
pub struct Object {
|
||||
pub name: String,
|
||||
pub x: f64,
|
||||
pub y: f64,
|
||||
}
|
||||
|
||||
impl Simulation {
|
||||
pub fn new() -> Self {
|
||||
let universe = Universe::new();
|
||||
|
||||
Reference in New Issue
Block a user