From a3ad019010eb8147c5d1ee5b11ee3292f4abf6e5 Mon Sep 17 00:00:00 2001 From: ticki <ticki@users.noreply.github.com> Date: Wed, 2 Nov 2016 18:46:54 +0100 Subject: [PATCH] Yes. No. --- examples/commie.rs | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 examples/commie.rs diff --git a/examples/commie.rs b/examples/commie.rs new file mode 100644 index 00000000..feb80dfb --- /dev/null +++ b/examples/commie.rs @@ -0,0 +1,41 @@ +extern crate termion; + +use termion::{clear, color, cursor}; + +use std::{time, thread}; + +const COMMUNISM: &'static str = r#" + !######### # + !########! ##! + !########! ### + !########## #### + ######### ##### ###### + !###! !####! ###### + ! ##### ######! + !####! ####### + ##### ####### + !####! #######! + ####!######## + ## ########## + ,######! !############# + ,#### ########################!####! + ,####' ##################!' ##### + ,####' ####### !####! + ####' ##### + ~## ##~ +"#; + +fn main() { + let mut state = 0; + + println!("\n{}{}{}{}{}{}", cursor::Hide, clear::All, cursor::Goto(1, 1), color::Fg(color::Black), color::Bg(color::Red), COMMUNISM); + loop { + println!("{}{} ☠GAY ☠SPACE ☠COMMUNISM ☠", cursor::Goto(1, 1), color::Bg(color::AnsiValue(state))); + println!("{}{} WILL PREVAIL, COMRADES! ", cursor::Goto(1, 20), color::Bg(color::AnsiValue(state))); + + state += 1; + state %= 8; + + thread::sleep(time::Duration::from_millis(90)); + } +} -- GitLab