Project 1: Hangman console Programmer: Spencer Shimko 3/7/03:: Start initial design 1. Test validity argument passed (dictionary file) 2. Setup dictionary file as hashmap and verify it starts with a integer and that integer correctly identifies the number of words or lines 3. Read dictionary file into string array 4. Display welcome screen 5. Select random word from dict. array 6. Display hangman, available letters, correctly guessed letters 7. Request letter from user 8. Test validity of entry 9. Check and see if the guess is correct 10. If it is correct place the letter a. If the word is complete display and exit b. If the word is not complete return to 6 11. If the letter is incorrect add a piece to the hangman: a. If the hangman is completed display word and exit b. If the hangman is incomplete return to 6 3/8/03:: Start coding -created hangman.java which will be the executable driver -coded command line argument receiving and testing in main method -created dictionary.java which will contain all dictionary related methods -decided to use LinkList class for wordlist and discovered BufferedReader works well with FileReader -added a method to return random word in dictionary class 3/9/03:: -created new display class that will "manage" console display -ran into issues deciding which display algorithm to use for the hanging man. many repeating parts. want to find the optimal method for display w/ the least condition testing -added several more methods to display class to display alphabet, secret word, exit information -compiled dictionary.java and display.java for the first time. cleaned up minor syntax errors. logical errors won't show up till I run the app... -added significant code to driver in hangman.java file. moved the "engine" into a method called runGame to keep everything neat and tidy -decided to use a linklist for the alphabet similar to the one used for the wordlist. problem: LinkList requires and object and "char" is just a primitve datatype. solution: use the Character class and it's methods to provide a clean conversion between an object and a primitive datatype. -how should I assign the alphabet to the LinkList? try using a for loop to increment the decimal ascii code. start at 97 and work your way up. use (char) 97... to typecast an integer as a character. -I will use two objects to hold the secret word. one will be a String so I can use String methods on it to locate letters. The other will be a char array that will hold the correct guesses. There were many ways to implement this perhaps using an Character array would have been easier then doing the conversions back and forth? But the code is already in and the other classes depend on char datatypes. -Getting user input was more difficult then I thought. But the neat thing is it now allows the user to enter more then one letter at once which helped me in debugging. -Although it isn't required I have implemented a loop to play another game is the user wishes. 3/10/03::-Time to compile the hangman.java... 20 errors mostly syntax. I also have to add some "try/catch" statements in the two methods I receive user input. -Compiles sucessfully! Operates and handles errors as expected but Hangman display is shifted and not correctly aligned. -Done... Everything works as described in the project description!