some more reorg

This commit is contained in:
Christopher
2023-03-02 21:35:45 +13:00
parent 873b974473
commit 5973d97a16
2 changed files with 11 additions and 7 deletions

View File

@@ -209,12 +209,7 @@ pub fn display_damage_control(enterprise: &Enterprise) {
return;
}
println!("Device State of Repair");
for key in systems::KEYS {
let damage = enterprise.damaged.get(key).unwrap_or(&0.0);
println!("{:<25}{}", systems::name_for(key), damage)
}
println!();
view::damage_control(enterprise);
}
pub fn perform_long_range_scan(galaxy: &mut Galaxy) {

View File

@@ -1,4 +1,4 @@
use crate::model::{Galaxy, Pos, EndPosition, SectorStatus};
use crate::model::{Galaxy, Pos, EndPosition, SectorStatus, Enterprise, systems};
pub fn full_instructions() {
println!(
@@ -342,6 +342,15 @@ pub fn system_repair_completed(name: String) {
println!(" {name} repair completed.")
}
pub fn damage_control(enterprise: &Enterprise) {
println!("Device State of Repair");
for key in systems::KEYS {
let damage = enterprise.damaged.get(key).unwrap_or(&0.0);
println!("{:<25}{}", systems::name_for(key), damage)
}
println!();
}
pub fn long_range_scan(galaxy: &Galaxy) -> Vec<Pos> {
let cx = galaxy.enterprise.quadrant.0 as i8;