mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-25 04:15:45 -08:00
implemented input instructions
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::process::exit;
|
||||
|
||||
use input::prompt;
|
||||
use input::{prompt, prompt_yes_no};
|
||||
use model::{Galaxy, systems};
|
||||
|
||||
mod input;
|
||||
@@ -12,6 +12,12 @@ fn main() {
|
||||
ctrlc::set_handler(move || { exit(0) })
|
||||
.expect("Error setting Ctrl-C handler");
|
||||
|
||||
view::title();
|
||||
if prompt_yes_no(view::prompts::INSTRUCTIONS) {
|
||||
view::full_instructions();
|
||||
let _ = input::prompt(view::prompts::WHEN_READY);
|
||||
}
|
||||
|
||||
let mut galaxy = Galaxy::generate_new();
|
||||
let initial_klingons = galaxy.remaining_klingons();
|
||||
let initial_stardate = galaxy.stardate;
|
||||
|
||||
@@ -154,7 +154,9 @@ pub fn full_instructions() {
|
||||
direction/distance calculations.
|
||||
Option 5 = Galactic Region Name Map
|
||||
This option prints the names of the sixteen major
|
||||
galactic regions referred to in the game.")
|
||||
galactic regions referred to in the game.
|
||||
|
||||
")
|
||||
}
|
||||
|
||||
pub fn enterprise() {
|
||||
|
||||
@@ -43,5 +43,5 @@ Started after movement and display of stats was finished (no energy management o
|
||||
- [x] check all areas where time should move, and adjust accordingly
|
||||
- looks to only be on nav and repair
|
||||
- [x] defeat due to time expired
|
||||
- [ ] intro instructions
|
||||
- [x] intro instructions
|
||||
- [x] victory
|
||||
|
||||
Reference in New Issue
Block a user