So I've been creating a little hangman game in processing using eclipse for my son. I have all the code looking smooth enough but I cant seem to get it to run. Could anyone please help me out finishing this? You're help would be hugely appreciated. Here is the code. I have it all in one class which may be a problem also.
private String[] AFI = {"Citizen Kane","The Godfather","Mr Smith Goes to Washington","Goodfellas","Saving Private Ryan","The Shawshank Redemption","To Kill a Mockingbird","Casablanca","Psycho","The Graduate","Gone With The Wind","The Wizard of Oz","Schindler's List","Star Wars","Raging Bull","Singin' in the Rain","Lawrence of Arabia","Vertigo","The Wizard of Oz","City Lights","The Searchers","2001: A Space Odyssey","Sunset Boulevard","The General","On the Waterfront","It's a wonderful Life","Chinatown","Some Like it Hot","The Grapes of Wrath","E.T. the Extra-Terrestrial","High Noon","All About Eve","Double Indemnity","Apocalypse Now","The Maltese Falcon","The Godfather Part II","One Flew Over the Cuckoo's Nest","Snow White and the Seven Dwarfs","Annie Hall","The Bridge on the River Kwai","The Best Years of our Lives","The Treasure of the Sierra Madre","Dr. Strangelove","The Sound of Music","King Kong","Bonnie and Clyde","Midnight Cowboy","The Philadelphia Story","Shane","It happened One Night","A Streetcar Named Desire","Rear Window","Intolerance","The Lord of the Rings: The Fellowship of the Ring","West Wide Story","Taxi Driver","The Deer Hunter","MASH","North by Northwest","Jaws","Rocky","The Gold Rush","Nashville","Duck Soup","Sullivan's Travels","American Graffiti","Cabaret","Network","The African Queen","Raiders of the Lost Ark","Who's Afraid of Virginia Woolf?","Unforgiven","Tootsie","A Clockwork Orange","Butch Cassidy and the Sundance Kid","The Silence of the Lambs","In the Heat of the Night","Forrest Gump","All the President's Men","Modern Times","The Wild Bunch","The Apartment","Spartacus","Sunrise: A song of Two Humans","Titanic","Easy Rider","A Night at the Opera","Platoon","12 Angry Men","Bringing Up Baby","The Sixth Sense","Swing Time","Sophie's Choice","The French Connection","Pulp Fiction","The Last Picture Show","Do the Right Thing","Blade Runner","yankee Doodle Dandy","Toy Story","Ben-Hur"
};
private String[] Stones = {"The Rolling Stones","The Rolling Stones, Now!",
"Out of Our Heads","England's Newest Hit Makers","December's Children (And Everybody's)",
"Aftermath","Between the Buttons","Their Satanic Majesties Request","Beggars Banquet",
"Let it Bleed","Sticky Fingers","Exile on Main St.","Goats Head Soup","It's Only Rock n' Roll",
"Black and Blue","Some Girls","Emotional Rescue","Tattoo You","Undercover","Dirty Work",
"Steel Wheels","Voodoo Lounge","Bridges to Babylon","A Bigger Bang"};
private Set<Character> myGuessedChars = new HashSet<Character>();
private Map<Integer, String[]> myFiles = new HashMap<Integer, String[]>();
private Phrase myPhrase;
public InputHandler()
{
myFiles.put(1, AFI);
myFiles.put(2, NFLTeams);
myFiles.put(3, Stones);
}
public void newGame()
{
myGuessedChars.clear();
}
public void updateGuess(char guess)
{
guess=(""+guess).toUpperCase().charAt(0);
myGuessedChars.add(guess);
String toDisplay = myPhrase.display();
}
public Phrase initialize(int n)
{
String[] possibilities = myFiles.get(n);
myPhrase = new Phrase(possibilities[new Random().nextInt(possibilities.length)], this);
New to Processing any help is massively appreciated. I have 2 classes created in Java but I'd like to convert them to processing anyone up for helping me convert them?