summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/server.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/server.rs b/src/bin/server.rs
index ea961b7..0429224 100644
--- a/src/bin/server.rs
+++ b/src/bin/server.rs
@@ -5,6 +5,7 @@ use std::net::TcpListener;
use std::thread::sleep;
use std::time::Duration;
+use space::constants;
use space::mass::Mass;
use space::math::rand_name;
use space::server::connection::ServerConnection;
@@ -12,7 +13,7 @@ use space::server::connection::ServerConnection;
fn populate() -> HashMap<String, Mass> {
let mut masses: HashMap<String, Mass> = HashMap::new();
- for _ in 0..10 {
+ for _ in 0..constants::ASTROID_COUNT {
masses.insert(rand_name(), Mass::new_astroid());
}
@@ -48,7 +49,7 @@ fn main() {
mass.process();
}
- sleep(Duration::from_millis(100));
+ sleep(Duration::from_millis(constants::SLEEP_DURATION));
}
}
}