"He or she is a slimy-sided, frog-mouthed, silt-eating slug with the brains of a turtle." — Dial-A-Curse
Random events are at the heart of interesting games and puzzles. Humans quickly grow bored of things that are always the same, so let’s learn how to make our programs more interesting by having them behave differently each time they are run. This exercise will introduce how to randomly select one or more elements from lists of options. To explore randomness, we’ll create a program called |
In order to test randomness, though, we need to control it. It turns out that "random" events on computers are rarely actually random but only "pseudo-random," which means we can control them using a "seed."[9] Each time you use the same seed, you get the same "random" choices!
Shakespeare had some of the best insults, so we’ll draw from the vocabulary of his works. Here is the list of adjectives you should use:
bankrupt base caterwauling corrupt cullionly detestable dishonest false filthsome filthy foolish foul gross heedless indistinguishable infected insatiate irksome lascivious lecherous loathsome lubbery old peevish rascaly rotten ruinous scurilous scurvy slanderous sodden-witted thin-faced toad-spotted unmannered vile wall-eyed
And these are the nouns: