



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Here is one example of a game after the user entered five words found in the game and the dictionary. GUI Details The JLabel must have "not in the dice" after any word that is in the dictionary, but not found in the 16 characters using the rules of Boggle (as with LOVE above). The JLabel must have "not in the dictionary" appears after any string of characters in the 16 characters, but is not found in the dictionary. The JLabel must have "already chosen" appears after any string of characters found in the 16 characters, that us in found in the dictionary, but has already been added to the list of correct words If the most recent input is a word that is in the dictionary, found in the 16 characters, and not in the list, set the JLabel to show the number of words guessed and the current score. In this computer-based version of the game, you will be allowed as much time as you want to play against the computer. Whenever you want, you can end the game and be shown your score and how many words the computer found. Don’t be surprised if the computer handily beats you virtually every time. You must show this list at the end of each game. This is done with JOptionPane.showMessageDialog(null, String)
assertTrue (b.stringFound("ABC")); assertTrue (b.stringFound("ABCD")); assertTrue (b.stringFound("AEI")); assertTrue (b.stringFound("AEIM")); assertTrue (b.stringFound("AFK")); assertTrue (b.stringFound("AFKP")); assertTrue (b.stringFound("AFK")); assertTrue (b.stringFound("AFKP")); assertTrue (b.stringFound("ABFEJINM")); assertTrue (b.stringFound("ABEFIJMN")); assertTrue (b.stringFound("ABCDHGFEIJKLPONM")); assertTrue (b.stringFound("ABCDHLPOKJNMIEFG")); } @Test public void testStringFindWhenNotThere () { Board b = new Board(c); assertFalse (b.stringFound("ACB")); assertFalse (b.stringFound("AIE")); assertFalse (b.stringFound("AKF")); assertFalse (b.stringFound("ABCE")); // ... } @Test public void testStringFindWhenAttemptIsMadeToUseALetterTwice () { Board b = new Board(c); assertFalse (b.stringFound("ACA")); assertFalse (b.stringFound("AEFBA")); // ... } }
2. Complete a Dictionary with one static method (no object required) that returns a collection of strings where all words must be in uppercase. We will use the file BoggleWords, a file of 81,055 words many people believe are spelled correctly. assertEquals(81055, words.size()); assertTrue(words.contains("PARENT")); assertTrue(words.contains("TREE")); assertFalse(words.contains("tree")); This design of the dictionary class is set up to only read from the input file once. 3. Write a Scorer class with one static method (no object required) that returns the total score according to these Boggle rules. Word Length Points 3 1 4 1 5 2 6 3 7 5 8+ 11
4. Implement Roller so it can return a 2D array set up randomly. This is meant to simulate rolling 16 dice. Ignoring the Qu letter, here are the letters of each of the 16 six-sided dice where each charAt 0..5 in the string is one side of one die:
Project and Folder Names to Use The Model: 24-April (for 10pt bonus):
The View: 1-May, 2007:
Grading Criteria added 19-April (Subject to change)
Model 70 pts
GUI due 1-May 30pts