Skip to content

Commit

Permalink
Pull Word List into it's own file
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Smith committed Sep 23, 2014
1 parent a959343 commit 7625f01
Show file tree
Hide file tree
Showing 3 changed files with 384 additions and 384 deletions.
382 changes: 2 additions & 380 deletions src/main/java/com/hangman/RandomAnswerGeneratorFromList.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,384 +3,6 @@
public class RandomAnswerGeneratorFromList implements AnswerGenerator {
private RandomNumberGenerator generator;

private static final String wordList[] = {
"aboard",
"accept",
"accident",
"accurate",
"acres",
"active",
"actual",
"additional",
"adjective",
"adult",
"adventure",
"advice",
"affect",
"Alice",
"alphabet",
"announced",
"anybody",
"apartment",
"applied",
"appropriate",
"April",
"arrange",
"arrangement",
"arrive",
"atom",
"attempt",
"August",
"Australia",
"Autumn",
"aware",
"badly",
"Bay",
"bee",
"behavior",
"belt",
"bend",
"bet",
"birth",
"bite",
"blind",
"border",
"bound",
"brass",
"breathe",
"breeze",
"brick",
"brief",
"buried",
"calm",
"camera",
"canal",
"captured",
"Casey",
"cast",
"castle",
"chamber",
"characteristic",
"chose",
"claws",
"coach",
"Columbus",
"command",
"compass",
"consonant",
"constantly",
"contrast",
"cookies",
"crack",
"curve",
"customs",
"damage",
"Daniel",
"Danny",
"David",
"dawn",
"declared",
"deeply",
"definition",
"depth",
"diameter",
"difficulty",
"dirty",
"discussion",
"dish",
"doll",
"Don",
"donkey",
"driven",
"dug",
"dull",
"duty",
"eager",
"earn",
"Eddy",
"Egypt",
"eleven",
"Ellen",
"engineer",
"equally",
"equator",
"essential",
"eventually",
"exchange",
"exist",
"explanation",
"explore",
"facing",
"fairly",
"fewer",
"fierce",
"fifth",
"film",
"finest",
"fireplace",
"firm",
"fix",
"flame",
"floating",
"Florida",
"folks",
"former",
"fort",
"forty",
"fox",
"Fred",
"frog",
"fully",
"garage",
"gasoline",
"gift",
"goose",
"grabbed",
"grade",
"grandmother",
"gravity",
"Greece",
"guard",
"gulf",
"habit",
"halfway",
"handsome",
"hang",
"happily",
"harbor",
"Harry",
"hay",
"he'll",
"headed",
"heading",
"hello",
"herd",
"hollow",
"horn",
"hospital",
"hunter",
"ill",
"Illinois",
"image",
"income",
"independent",
"industrial",
"instant",
"interior",
"introduced",
"January",
"Jeff",
"Johnson",
"Jones",
"judge",
"jungle",
"kids",
"label",
"labor",
"Lee",
"limited",
"location",
"loss",
"lucky",
"lungs",
"machinery",
"mad",
"magnet",
"mainly",
"managed",
"manufacturing",
"Maria",
"Mars",
"Martin",
"mathematics",
"melted",
"memory",
"mental",
"military",
"mill",
"mission",
"mistake",
"mixture",
"monkey",
"mood",
"Mount",
"movie",
"mysterious",
"nails",
"naturally",
"nearer",
"negative",
"neighborhood",
"nervous",
"Norway",
"noted",
"nuts",
"obtain",
"occasionally",
"October",
"officer",
"official",
"Ohio",
"opinion",
"opportunity",
"organization",
"origin",
"ourselves",
"owner",
"package",
"palace",
"pale",
"passage",
"Pennsylvania",
"percent",
"perfectly",
"Philadelphia",
"pilot",
"plastic",
"plates",
"pleasure",
"plural",
"plus",
"poet",
"poetry",
"Pole",
"policeman",
"porch",
"port",
"positive",
"possibly",
"pot",
"pour",
"powder",
"practical",
"previous",
"pride",
"primitive",
"principle",
"private",
"prize",
"promised",
"properly",
"protection",
"pupil",
"purple",
"raw",
"reader",
"rear",
"recall",
"refused",
"relationship",
"remarkable",
"remove",
"require",
"rhyme",
"roar",
"rocky",
"Rome",
"rubbed",
"rush",
"Russia",
"Russian",
"saddle",
"sale",
"salmon",
"satellites",
"satisfied",
"scared",
"screen",
"seldom",
"select",
"selection",
"settle",
"shake",
"shaking",
"shallow",
"shelf",
"shelter",
"shine",
"shout",
"silly",
"simplest",
"sink",
"slabs",
"slave",
"slight",
"slip",
"slope",
"soap",
"society",
"solar",
"somebody",
"somehow",
"species",
"specific",
"spider",
"spin",
"split",
"sport",
"stairs",
"stared",
"steep",
"stems",
"stiff",
"stock",
"stomach",
"stove",
"stranger",
"struggle",
"surrounded",
"swam",
"swept",
"swung",
"syllable",
"tales",
"tank",
"tape",
"thou",
"thumb",
"thy",
"tide",
"tightly",
"Tim",
"tobacco",
"torn",
"toy",
"trace",
"trap",
"treated",
"tribe",
"troops",
"tropical",
"trunk",
"tune",
"TV",
"typical",
"unhappy",
"universe",
"University",
"vapor",
"vertical",
"vessels",
"victory",
"visitor",
"vote",
"voyage",
"wealth",
"weigh",
"welcome",
"weren't",
"whistle",
"widely",
"Wilson",
"wolf",
"worried",
"wrapped",
"writer",
"younger",
"zero",
"zoo"};


public RandomAnswerGeneratorFromList(RandomNumberGenerator generator)
{
this.generator = generator;
Expand All @@ -394,7 +16,7 @@ public RandomAnswerGeneratorFromList()

@Override
public String generateAnswer() {
int index = (int) (this.generator.Random() * (wordList.length - 1));
return wordList[index];
int index = (int) (this.generator.Random() * (WordList.words.length - 1));
return WordList.words[index];
}
}
Loading

0 comments on commit 7625f01

Please sign in to comment.