mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-27 13:14:15 -08:00
some more reorg
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user