The Word Sleuth Game

Lab Objective: Reading text files, user interfaces, manipulating two-dimensional arrays, implementing String matching

  1. Write a Java program with a user interface similar to this that can be used to play the Word Sleuth game. You may assume that the data for the game is available in a text file in the following format.
  2. Here is an example illustrating text file i/o in Java. You should not hard code the grid dimensions in your program. Instead, your program must calculate the dimensions of the grid needed from the data in the text file.
  3. Do not hard code the file name in your program. Instead, allow user to specify a file name using a file chooser. Click here for a tutorial on using file choosers.
  4. Recall that the word for which you are searching may appear in any orientation in the grid. Left to right, right to left, top to bottom, bottom to top, along a diagonal in either direction. Also, recall that it may be more convenient to store the characters in a separate array that you use for searching.
  5. Your program must highlight the word when it is found. Here are the words that can be found in this example:Cruz, Grand, Herne, Mallard, Montego, North, Oyster, Palm, Richards, Saint Anns, Sheepshead, Tampa, Thunder, Walvis, West.