implemented input instructions

This commit is contained in:
Christopher
2023-03-05 06:33:59 +13:00
parent 217e76071b
commit 15cf7b31ff
3 changed files with 11 additions and 3 deletions

View File

@@ -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;

View File

@@ -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() {

View File

@@ -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