From 070485e093dc540a5db9650d438cffe3d18d3883 Mon Sep 17 00:00:00 2001 From: tom barrett Date: Tue, 12 Feb 2019 13:20:06 -0600 Subject: added constants file, made so items are referred to by an enum, figured better ways than ship_clone --- src/constants.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/constants.rs (limited to 'src/constants.rs') diff --git a/src/constants.rs b/src/constants.rs new file mode 100644 index 0000000..c896a39 --- /dev/null +++ b/src/constants.rs @@ -0,0 +1,20 @@ +pub const ASTROID_COUNT: usize = 10; +pub const ASTROID_STORAGE_CAPACITY: usize = 100; +pub const ASTROID_STARTING_MINERALS_MAX: usize = 20; +pub const ASTROID_STARTING_VELOCITY_MAX: f64 = 0.5; +pub const ASTROID_STARTING_POSITION_MAX: f64 = 50.0; + +pub const SHIP_STORAGE_CAPACITY: usize = 100; +pub const SHIP_CONSTRUCTION_IRON_COST: usize = 5; +pub const SHIP_CONSTRUCTION_TIME: u64 = 5; +pub const SHIP_MINING_TIME: u64 = 5; +pub const SHIP_MINING_RANGE: f64 = 10.0; +pub const SHIP_NAVIGATION_TIME: u64 = 3; +pub const SHIP_NAVIGATION_RANGE: f64 = 100.0; +pub const SHIP_REFINERY_TIME: u64 = 5; +pub const SHIP_TRACTORBEAM_STRENGTH: f64 = 0.1; + +pub const IRON_SIZE: usize = 1; +pub const CRUDE_MINERALS_SIZE: usize = 10; + +pub const SLEEP_DURATION: u64 = 100; -- cgit v1.2.3