CPS 108, Spring 2001, Boggle


See ~ola/cps108/joggle on acpub or Joggle Code
For information on the network client front end, see JoggleFE.java and the javadoc.

Boggling and Joggling

Boggle is a trademark of Parker Brothers. Joggle is the Java version of Boggle (note: there are many versions of Boggle/Joggle in Java on the internet. You can do better than these, especially if you're re-using common game classes/code as part of the game project in CPS 108).

Boggle is a word game. Sixteen cubes (dice) have letters on each side. These are tossed, and a 4 x 4 grid provides the playing field for Boggle. Words are formed by connecting cubes that are adjacent either horizontally, vertically, or diagonally. For example, a board is shown below on the left with the word TRADES shaded in the board on the right.

*

In the basic version of Boggle, a letter cannot be re-used within a word. For example, the word SET can be formed in the board above, but the word SETS cannot be formed since the S cannot be re-used.

You are to write an application (and optionally an applet) that allows the user to play boggle "against" the computer. For extra credit your program should be able to connect to a Joggle Server to allow several people to play against each other. The specifications of the Joggle Server will be made available later.


Requirements

Your program will read a dictionary of legal words, roll the letter cubes, and allow a user to type/enter words. All words formed by the user should be added to a scrollable list box. A timer should inform the user how much time is left, initially allow two minutes to play the game, but this should be configurable. When the game is over, all words that the user missed should be shown in another listbox. If the user clicks on a word in either listbox, the letters that are used to form that word should be highlighted, or in some manner made more "visible".

You can also implement a text-based version of the game in either C++ or Java or both. The text-version should have the same functionality (basically) as the graphical version.

Options

You can optionally add the following features which will earn extra points.

Details

A C definition for an array of Boggle cubes is shown below. This shows the actual cubes from a Boggle game (note: the 'Q' cube has a u with it that isn't shown below).

static char * cubes[] = { "forixb", "moqabj", "gurilw", "setupl", "cmpdae", "acitao", "slcrae", "romash", "nodesw", "hefiye", "onudtk", "tevign", "anedvz", "pinesh", "abilyt", "gkyleu" };

To find all the words on a Boggle board, the easiest method is to look up every word in the dictionary on the board (this may seem backwards, but it's easier to code and faster.) There will be more details on this as necessary. There are some hints on one method for finding words in the Tapestry book, see exercise 12.8 on page 637.

You will be given a compressed boggle dictionary to use in your final program. However, initially you'll need to make your own dictionary of legal words. You may find /usr/dict/words a useful source. You might, for example, take the 3, 4, 5, and 6 letter words from it to use as your dictionary. The boggle dictionary and reading code will be made available at a later date.

Grading

You can earn up to 40 points for this game. Points are shown below. Points are earned as shown for functionality, the same number of points can be earned for documentation/design in each category (so 20+20=40). If you implement the same architecture/game in C++ and Java you can earn 50% more points (for the C++ version).
Feature Points
Text Boggle 3
Graphic Boggle 6
Applet Boggle 3
Networked Boggle 4
Extra Stuff 4

Owen L. Astrachan
Last modified: Mon Mar 19 23:23:23 EST 2001