From b5896e2d7597e42818a47710da22098d178bf8f6 Mon Sep 17 00:00:00 2001 From: tom barrett Date: Tue, 27 Feb 2018 06:59:58 -0600 Subject: -now use velocity and position vector, astroids are now randomly populated --- src/mass.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mass.rs') diff --git a/src/mass.rs b/src/mass.rs index 71723cd..d91b292 100644 --- a/src/mass.rs +++ b/src/mass.rs @@ -1,11 +1,11 @@ use downcast::Any; pub trait Mass : Any { - fn new(name : &str, location : (f64, f64, f64)) -> Self where Self: Sized; fn name(&self) -> &String; - fn location(&self) -> (f64, f64, f64); - fn set_location(&mut self, location : (f64, f64, f64)); + fn position(&self) -> (f64, f64, f64); fn serialize(&self) -> String; + fn process(&mut self); + fn give_acceleration(&mut self, acceleration : (f64, f64, f64)); } #[derive(Serialize, Deserialize, Debug)] -- cgit v1.2.3