reorganised some stuff and started coding another game

This commit is contained in:
FantasyPvP
2024-11-23 21:34:54 +00:00
parent 69591e6bb2
commit 39d9b949e9
31 changed files with 350 additions and 235 deletions
+49
View File
@@ -0,0 +1,49 @@
use async_trait::async_trait;
use alloc::{boxed::Box, string::String, vec::Vec};
use crate::{
println,
std::application::{
Application,
Error,
},
};
const GIGACHAD: [&'static str; 3] = ["fantasypvp", "zxq5", "ZXQ5"];
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 GIGACHAD.contains(&username) {
println!("{} is a gigachad B'YES", username);
println!("
/$$ /$$$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$ /$$ /$$ /$$
/$$/|_____ $$ | $$ / $$ /$$__ $$| $$____/ /$$/| $$| $$
/$$/ /$$/ | $$/ $$/| $$ \\ $$| $$ /$$/ \\ $$\\ $$
/$$/ /$$/ \\ $$$$/ | $$ | $$| $$$$$$$ /$$/ \\ $$\\ $$
| $$ /$$/ >$$ $$ | $$ | $$|_____ $$ /$$/ /$$/ /$$/
\\ $$ /$$/ /$$/\\ $$| $$/$$ $$ /$$ \\ $$ /$$/ /$$/ /$$/
\\ $$ /$$$$$$$$| $$ \\ $$| $$$$$$/| $$$$$$//$$/ /$$/ /$$/
\\__/|________/|__/ |__/ \\____ $$$ \\______/|__/ |__/ |__/
\\__/
")
} else {
println!("{} is not a gigachad", username);
}
}
}