Skip to content

Instantly share code, notes, and snippets.

@dmberry
Created February 9, 2012 19:41
Show Gist options
  • Save dmberry/1782334 to your computer and use it in GitHub Desktop.
Save dmberry/1782334 to your computer and use it in GitHub Desktop.
Shakespeare Insult Generator 2.0
# ------------------------------------------------------
#
# Shakespeare Insult Generator 2.0
#
# The program generates a random Shakespearean insult.
# Based on the original Perl code by Stephen Ramsay
#
# Written by David M. Berry
# 09 February 2012
#
# For the Critical Code Workshop 2012
#
# Written in Zajal ( http://zajal.cc )
#
# ------------------------------------------------------
# ------------------------------------------------------
# Here be arrays
# ------------------------------------------------------
firstarray = ["artless", "bawdy", "beslubbering", "bootless", "churlish","cockered", "clouted", "craven","currish", "dankish","dissembling", "droning","errant", "fawning","fobbing", "froward","frothy", "gleeking", "goatish", "gorbellied","impertinent", "infectious", "jarring", "loggerheaded","lumpish", "mammering", "mangled", "mewling","paunchy", "pribbling", "puking", "puny","qualling","rank", "reeky","roguish","ruttish", "saucy", "spleeny", "spongy","surly", "tottering", "unmuzzled","vain","venomed", "villainous", "warped", "wayward","weedy", "yeasty", "cullionly","fusty","caluminous", "wimpled","burly-boned", "misbegotten","odiferous", "poisonous", "fishified","Wart-necked"]
secondarray = ["base-court", "bat-fowling", "beef-witted","beetle-headed","boil-brained", "clapper-clawed", "clay-brained", "common-kissing","crook-pated","dismal-dreaming", "dizzy-eyed", "doghearted","dread-bolted", "earth-vexing","elf-skinned","fat-kidneyed","fen-sucked", "flap-mouthed","fly-bitten", "folly-fallen","fool-born", "full-gorged", "guts-griping", "half-faced","hasty-witted", "hedge-born", "hell-hated", "idle-headed","ill-breeding", "ill-nurtured","knotty-pated", "milk-livered","motley-minded", "onion-eyed", "plume-plucked", "pottle-deep","pox-marked", "reeling-ripe","rough-hewn", "rude-growing","rump-fed", "shard-borne", "sheep-biting", "spur-galled","swag-bellied", "tardy-gaited","tickle-brained", "toad-spotted","urchin-snouted", "weather-bitten", "whoreson", "malmsey-nosed","rampallian", "lily-livered","scurvy-valiant", "brazen-faced","unwash'd", "bunch-back'd","leaden-footed", "muddy-mettled"]
thirdarray = ["apple-john", "baggage", "barnacle","bladder","boar-pig","bugbear", "bum-bailey", "canker-blossom","clack-dish", "clotpole", "coxcomb", "codpiece","death-token", "dewberry", "flap-dragon", "flax-wench","flirt-gill", "foot-licker", "fustilarian", "giglet","gudgeon", "haggard", "harpy", "hedge-pig","horn-beast", "hugger-mugger", "joithead","lewdster","lout","maggot-pie","malt-worm", "mammet","measle", "minnow","miscreant", "moldwarp","mumble-news", "nut-hook", "pigeon-egg", "pignut","puttock", "pumpion", "ratsbane","scut","skainsmate", "strumpet", "varlot", "vassal","whey-face", "wagtail", "knave", "blind-worm","popinjay","scullian", "jolt-head", "malcontent","devil-monk", "toad", "rascal", "Basket-Cockle"]
# ------------------------------------------------------
# Here be variable declarations
# ------------------------------------------------------
word1 = ""
word2 = ""
word3 = ""
# ------------------------------------------------------
# Here be the setup initialiser (constructor?)
# ------------------------------------------------------
setup do
word1 = firstarray[rand(firstarray.count)] + " "
word2 = secondarray[rand(secondarray.count)] + " "
word3 = thirdarray[rand(thirdarray.count)]
end
# ------------------------------------------------------
# Here be the main loop called 'draw'
# ------------------------------------------------------
draw do
color :orange
text ""
text "A New Edition of Stephen Ramsay's World Famous:"
text "-----------------------------------------------"
text ""
text ""
text " ** Shakespeare Insult Generator **"
text ""
text ""
color :yellow
text "-------------------------------------------"
text ""
text " Thou "+word1+word2+word3+"!"
text ""
text "-------------------------------------------"
text ""
text ""
text ""
text ""
text ""
text ""
color :grey
text " Press mouse for more...."
end
# ------------------------------------------------------
# Here be the event method for 'mouse_down'
# ------------------------------------------------------
mouse_down do
word1 = firstarray[rand(firstarray.count)] + " "
word2 = secondarray[rand(secondarray.count)] + " "
word3 = thirdarray[rand(thirdarray.count)]
end
# ------------------------------------------------------
# Here be the end
# ------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment