added the gigachad detector

This commit is contained in:
FantasyPvP
2023-09-27 22:50:28 +01:00
parent 067d780fdf
commit 49bc77e44a
9 changed files with 176 additions and 72 deletions
+51
View File
@@ -0,0 +1,51 @@
use async_trait::async_trait;
use alloc::{boxed::Box, string::String, vec::Vec};
use crate::{
std::os::OS,
std::io::{Color, write},
println,
std::application::{
Application,
Error,
},
};
const GIGACHAD: &'static str = "fantasypvp";
pub struct GigachadDetector {}
#[async_trait]
impl Application for GigachadDetector {
fn new() -> Self {
Self {}
}
async fn run(&mut self, args: Vec<String>) -> Result<(), Error> {
for arg in args {
self.detect_gigachad_by_username(&arg)
}
Ok(())
}
}
impl GigachadDetector {
pub fn detect_gigachad_by_username(&self, username: &str) {
if username == GIGACHAD {
println!("{} is a gigachad B'YES", username);
println!("
/$$$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$
|_____ $$ | $$ / $$ /$$__ $$| $$____/
/$$/ | $$/ $$/| $$ \\ $$| $$
/$$/ \\ $$$$/ | $$ | $$| $$$$$$$
/$$/ >$$ $$ | $$ | $$|_____ $$
/$$/ /$$/\\ $$| $$/$$ $$ /$$ \\ $$
/$$$$$$$$| $$ \\ $$| $$$$$$/| $$$$$$/
|________/|__/ |__/ \\____ $$$ \\______/
\\__/
")
} else {
println!("{} is not a gigachad", username);
}
}
}