From 40056340865607d75b7b020d30b61747ebe996e9 Mon Sep 17 00:00:00 2001 From: TimonPost Date: Tue, 14 Aug 2018 23:00:20 +0200 Subject: [PATCH] Overall commend improvement --- examples/program_examples/first_depth_search/src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/program_examples/first_depth_search/src/main.rs b/examples/program_examples/first_depth_search/src/main.rs index 90e781d..2c39a17 100644 --- a/examples/program_examples/first_depth_search/src/main.rs +++ b/examples/program_examples/first_depth_search/src/main.rs @@ -26,7 +26,7 @@ fn main() pub fn run() { // This is represents the current screen. - let screen = Screen::default(); + let screen = Screen::new(true); // set size of terminal so the map we are going to draw is fitting the screen. terminal(&screen).set_size(60,110); @@ -86,10 +86,9 @@ fn print_welcome_screen(screen: &Screen) if let Some(Ok(b'q')) = a { terminal.exit(); } - // print the current counter at the line of `Seconds to Go: {counter}` cursor.goto(48, 10); - crossterm.style(format!("{}", i)).with(Color::Red).on(Color::Blue).paint(&crossterm.get_screen()); + crossterm.style(format!("{}", i)).with(Color::Red).on(Color::Blue).paint(&screen); // 1 second delay thread::sleep(time::Duration::from_secs(1));