Skip to content

Instantly share code, notes, and snippets.

@benjjo
Last active March 8, 2020 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjjo/85d1049502a6ccaef570237c5fa39a81 to your computer and use it in GitHub Desktop.
Save benjjo/85d1049502a6ccaef570237c5fa39a81 to your computer and use it in GitHub Desktop.
Dwarf Quoter - Java edition
import javax.swing.*;
import java.util.ArrayList;
import java.util.Random;
/**
* The all amasing Dwarf Quoter is back! JAVA STYLE!!
* Hooray for everything.
*
* @author Benjo
* @version 1.6
*/
public class Main{
public static void main(String[] args) {
Main newDwarf = new Main();
}
private ArrayList<String> dwarfQuotes = new ArrayList<>();
//public static Main dwarf;
/**
* Calls the buildQuoter ArrayList
*/
public Main() {
JOptionPane.showMessageDialog(null, this.buildQuoter());
//System.out.println(buildQuoter());
}
/**
* Builds an array list with the dwarf quotes
*/
private String buildQuoter() {
Random rand = new Random();
this.dwarfQuotes.add("I'm always last and I don't like it.");
this.dwarfQuotes.add("Faithless is he who says farewell when the road darkens.");
this.dwarfQuotes.add("They had no honor in life. They have none now in death.");
this.dwarfQuotes.add("Whatever luck you live by... let's hope it lasts the night.");
this.dwarfQuotes.add("It's true you don't see many dwarf women. And in fact they are so alike in voice and appearance, that they are often mistaken for dwarf men.");
this.dwarfQuotes.add("I cannot jump the distance, you'll have to toss me.");
this.dwarfQuotes.add("And you know what this Dwarf says to that? Ishkhaqwi ai durugnul! I spit upon your grave!");
this.dwarfQuotes.add("There is some good stonework here.");
this.dwarfQuotes.add("You may do as you please in madness.");
this.dwarfQuotes.add("I have but returned to take what is mine; for I am the last of my people.");
this.dwarfQuotes.add("The new Gandalf is grumpier than the old one.");
this.dwarfQuotes.add("The Dwarves delved too greedily and too deep.");
this.dwarfQuotes.add("The air must be thin up there, elf, for ye are daft to come up with that plan");
this.dwarfQuotes.add("Never turn down an ale, who knows if it may be your last.");
this.dwarfQuotes.add("Her beard is winking at me.");
this.dwarfQuotes.add("Wherever there are elves, there are lies!");
this.dwarfQuotes.add("Nothing a hammer can't solve.");
this.dwarfQuotes.add("You can kill a dwarf, but you can never vanquish one!");
this.dwarfQuotes.add("The stones will sing if you let them.");
this.dwarfQuotes.add("Dwarven women are like axes. As dangerous from the back as from the front.");
this.dwarfQuotes.add("A mead in the hand, is worth two goblin heads in the bush.");
this.dwarfQuotes.add("Leave iron to rest before you hammer it.");
this.dwarfQuotes.add("You are softer than sandstone and drier than talc!");
this.dwarfQuotes.add("Cave toads speak little, but when they do, listen.");
this.dwarfQuotes.add("A pebble will stay dry inside, no matter how long it is submerged in a pool of water.");
this.dwarfQuotes.add("Nothing evens a race like an axe to the kneecaps.");
this.dwarfQuotes.add("The smallest pebble was once the biggest stone, the biggest stone was once bigger.");
return dwarfQuotes.get(rand.nextInt(dwarfQuotes.size()));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment