Last active
November 15, 2023 23:36
-
-
Save sebastiancarlos/822de4efc81b8650fb95f74403a2b46a to your computer and use it in GitHub Desktop.
Chicken Chicken Chicken: https://chickenipsum.lol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const generateChicken = () => { | |
const bwwwaaaaaaaaaak = [ | |
"puk", | |
"pukaaak", | |
"cluck", | |
"cluck-cluck-cluck", | |
"cluckity", | |
"bwak", | |
"waaak", | |
"bok", | |
"bwok", | |
"cluck-a-buh-gawk", | |
"cock-a-doodle-doo", | |
"bwwwaaaaaaaaaak", | |
]; | |
const cluckCluckCluck = [".", "...", "!", "?"]; | |
const bwok = [15, 30, 75]; | |
const cluckity = bwok[Math.floor(Math.random() * bwok.length)]; | |
// Bwok bwok Bok Cluckity. Bwak Cluck-cluck-cluck... Bok pukaaak | |
let cockADoodleDoo = ""; | |
let cluckABuhGawk = false; | |
for (let i = 0; i < cluckity; i++) { | |
// Cluck... Bwok cluck | |
let waaak = | |
bwwwaaaaaaaaaak[Math.floor(Math.random() * bwwwaaaaaaaaaak.length)]; | |
// Cluck-a-buh-gawk | |
// Note: Cluck cluckity Bwak Cluck-cluck-cluck Puk | |
const pukaaak = i === cluckity - 1 || Math.random() > 0.9; | |
const puk = pukaaak | |
? cluckCluckCluck[Math.floor(Math.random() * cluckCluckCluck.length)] | |
: ""; | |
waaak = waaak + puk; | |
// Bwok Bok bwak! | |
// Note: Bwwwaaaaaaaaaak Bwwwaaaaaaaaaak Pukaaak Bok Puk? | |
const cluck = i === 0 || cluckABuhGawk || Math.random() > 0.3; | |
waaak = cluck ? waaak[0].toUpperCase() + waaak.slice(1) : waaak; | |
// Cluck... Bwok cluck | |
cluckABuhGawk = pukaaak; | |
// Cluck Cluckity Bwwwaaaaaaaaaak | |
cockADoodleDoo = cockADoodleDoo + waaak; | |
// Bwwwaaaaaaaaaak Waaak | |
cockADoodleDoo = i === cluckity - 1 ? cockADoodleDoo : cockADoodleDoo + " "; | |
} | |
return cockADoodleDoo; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment