Browse Source

refactoring: add colors for german flag, formatted else

main
fdai7374 2 years ago
committed by fdai7451
parent
commit
f3de22b0ce
  1. 18
      src/builtins/blahaj.rs

18
src/builtins/blahaj.rs

@ -36,7 +36,9 @@ impl Builtin for Blahaj {
pride_flag(blahaj);
} else if args[0].eq("-ger") {
german(blahaj);
}else {println!("{} is not a valid style for blahaj",args[0])}
} else {
println!("{} is not a valid style for blahaj", args[0])
}
}
Ok(())
}
@ -48,7 +50,9 @@ fn trans_flag(blahaj: &str) {
println!("{}", lines.truecolor(91, 206, 250));//light blue
} else if index % 2 == 0 {
println!("{}", lines.white());
} else { println!("{}", lines.truecolor(245, 169, 184)); }//pink
} else {
println!("{}", lines.truecolor(245, 169, 184));//pink
}
}
}
@ -74,13 +78,13 @@ fn pride_flag(blahaj: &str) {
}
fn german(blahaj: &str) {
for (index, lines) in blahaj.lines().enumerate() {
if index <= 7 {
println!("{}",lines.truecolor(30,30,30));
println!("{}", lines.truecolor(30, 30, 30));//black
} else if index > 6 && index <= 12 {
println!("{}",lines.truecolor(255,0,0));
}else { println!("{}", lines.truecolor(255,255,0)); }
println!("{}", lines.truecolor(255, 0, 0));//red
} else {
println!("{}", lines.truecolor(255, 255, 0));//yellow
}
}
}
Loading…
Cancel
Save