diff --git a/README.md b/README.md index 918173a..e41fdc7 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,9 @@ Greet them as we have before. Watch the nibblers spin and snap. ``` +# Insults +Generates an insulting phrase for someone :D + # Rubiks Cube thing (WIP) It's just a rubiks cube in the terminal, written in rust.
![example image for rubiks](screenshots/rubiks.png) diff --git a/insults/Cargo.toml b/insults/Cargo.toml new file mode 100644 index 0000000..817a2ea --- /dev/null +++ b/insults/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "insults" +version = "0.1.0" +edition = "2021" + +[dependencies] +rand = "0.8.5" diff --git a/insults/insults b/insults/insults new file mode 100644 index 0000000..afb041e --- /dev/null +++ b/insults/insults @@ -0,0 +1,229 @@ +apish +retard +bald-pated +artless +barren-spirited +beslubbering +beast-eating +calmunating +cautelous +churlish +coldblooded +concupscible +covetous +crudy +cuckoldly +deceptious +degenerate +facinerious +fawning +finical +fusty +goastish +gorbellied +greasy +heinous +incontinent +inexecrable +insolent +lecherous +lisping +loathly +lubberly +lumpish +mammering +musty +naughty +obscene +overgorged +panderly +pestiferous +plumfy +puking +rascally +reeky +sanctimonious +sickly +solbbery +sneaping +spongy +stinking +superserviceable +thrasonical +unhandsome +unwiped +viperous +wanton +warped +witless +breast-eating +beef-witted +boiled-brained +clay-brained +dirt-rotten +dizzy-eyed +dull-brained +eye-offending +fat-kidneyed +flap-eared +foul-mouthed +half-blooded +hard-haired +hell-governed +hollow-eyed +hook-nosed +ill-tempered +knotty-pated +leaden-footed +leptus leering +lily-livered +logger-headed +lust-breathed +motley-minded +mouse-eaten +muddy-mettled +nook-shotten +one-trunk-inheriting +pale-hearted +pigeon-livered +puke-stocking +puppy-headed +rank-scented +rug-headed +rump-fed +self-glorious +senseless-obstinate +sheep-biting +shrill-tongued +snail-paced +sodden-witted +stretch-mouthed +stubborn-hard +swag-bellied +tardy-gaited +thick-eyed +three-suited +thripe-visaged +under-honest +uneducated +useless +white-livered +barmy +gormless +manky +minger +naff +idiotic +bigotted +stupid +blue-balled +arrogant +retarded +petulent +bigoted +phscopathic +small-minded +non-linux-user +pengiunless +crude +muppet +pikey +dodgy + +abomination +arch-villain +baggage +bed-presser +blockhead +braggart +bugbear +bull's pizzle +codpiece +capocchia +cornuto +costermonger +cot-quean +coxcomb +cozener +dissembler +dullard +dunghill +fashion-monger +fleshmonger +foot-licker +fustilarian +geck +giglet +horn-beast +horse-back-breaker +idiot-worshipper +jack-a-nape +lewdster +malignancy +malmsey-butt +measle +miscreant +mushrump +ox-head +parasite +pig-nut +pin-buttock +potato-finger +princox +purpose-chnager +quatch-buttock +rabbit-sucker +rampallian +rat-catcher +ratsbane +renegatho +scum +scut +starve-lackey +stock-fish +ticklebrain +under-skinner +villiago +cum-bucket +retard +tosser +wheevil +cretin +wanker +slag +daft-cow +arsehole +chav +git +nutter +pillock +plonker +prat +trollop +twat +knob-head +bell-end +skiver +wazzock +ninny +berk +airy-fairy +ankle-biter +arse-licker +arsemonger +chuffer +gannet +ligger +maggot +mingebag +two-dicked-dog +window +apple +cunt +dick +cock +cum-sock +phallus +pussy +bigot +capitalist diff --git a/insults/src/.main.rs.swp b/insults/src/.main.rs.swp new file mode 100644 index 0000000..7550332 Binary files /dev/null and b/insults/src/.main.rs.swp differ diff --git a/insults/src/main.rs b/insults/src/main.rs new file mode 100644 index 0000000..8e2f1ea --- /dev/null +++ b/insults/src/main.rs @@ -0,0 +1,35 @@ +use std::fs; +use std::io; +use rand::Rng; + +fn main() -> io::Result<()> { + let file_contents: String = fs::read_to_string("insults")?; + let lines: Vec<&str> = file_contents.split('\n').collect(); + let mut adjectives: Vec = Vec::new(); + let mut nouns: Vec = Vec::new(); + let mut noun = false; // nouns is set to true when we have reached the nouns section in the file + // so should start pushing insults to nouns instead of adjectives + let num_of_adjectives: u64 = 2; + + for line in lines { + if line == "" { + noun = true; + continue; + } + if noun { + nouns.push(line.to_string()); + } + else if noun != true { + adjectives.push(line.to_string()); + } + } + + for _x in 0..num_of_adjectives { + let random_adjective = adjectives[rand::thread_rng().gen_range(0..adjectives.len())].clone(); + print!("{}, ", random_adjective); + } + let random_noun = nouns[rand::thread_rng().gen_range(0..nouns.len())].clone(); + print!("{}\n", random_noun); + + Ok(()) +}