From 43b6290f4ad3f7a9acaee2ca8e40a96e9293a662 Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 7 Jul 2024 22:42:19 +0200 Subject: [PATCH] Add third planet for fun. --- src/main.rs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9477885..ba0cd5b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,17 +26,24 @@ fn main() { let planets = vec![ planet::PlanetBuilder::new() .with_name(String::from("Earth")) - .with_velocity(vec![-0.0002, 0.0]) - .with_positsion(0.0, -25.0) .with_mass(100000.0) + .with_radius(10.0) + .with_positsion(0.0, 0.00) + .with_color(canvas::BLUE) + .build(), + planet::PlanetBuilder::new() + .with_name(String::from("Moon I")) + .with_velocity(vec![0.0, -0.0004]) + .with_positsion(50.0, 0.0) + .with_mass(1000.0) .with_radius(5.0) .with_color(canvas::GREEN) .build(), planet::PlanetBuilder::new() - .with_name(String::from("Moon")) - .with_velocity(vec![0.0002, 0.0]) - .with_positsion(0.0, 25.0) - .with_mass(100000.0) + .with_name(String::from("Moon II")) + .with_velocity(vec![0.0004, 0.0]) + .with_positsion(0.0, 50.0) + .with_mass(100.0) .with_radius(5.0) .with_color(canvas::RED) .build(),