Docsity

Boggle the Game - Program Design and Development - Final Project | C SC 227, Study Guides, Projects, Research of Computer Science

Toggle sidebar
bg1
C Sc 227 Spring 2007 Final Project: Boggle
Due Dates (Bonus scheme and late day policy added 19-April)
Note: The syllabus states, "The final team project will have its own late policies". You cannot use any
personal late days for the final project. We have added a bonus opportunity.
The Model (70pts)
Tuesday 24-April, 2007 by 10:00pm
Wednesday 25-April, 2007 by 10:00pm
Thursday 26-April, 2007 by 10:00pm
Friday 27-April, 2007 by 10:00pm
After Friday
10pt bonus, 80/70 pts max
0pt bonus, 70/70 pts max
10pt deduction, 60/70 pts max
20pt deduction, 50/70 pts max
0 pts
The View (30pts)
Tuesday 1-May by 10:00pm
Wednesday 2-May by 10:00pm
After Wednesday
0pt bonus, 30/30 pts max
10pt deduction,20/30 pts max
0 pts
Collaboration
This final project is to be completed with one other person in pair programming
mode. All test and production code (or at least as much as is possible) should be
written with your programming partner. We will be meeting in 228GS for the final two
sections, but you will need to find time to work outside section
Boggle, the Game
The board game of Boggle has a
container that holds 16 dice that can be
"rolled". These 6-sided dice have letters
from which players try to find words.
Words are possible if letters line up next
to each other horizontally, vertically, or
diagonally. There are 3 letters that can
be connected to any letter on a corner, 5
for the other six letters on the borders,
and 8 for the middle four letters (there is
no wraparound). To make up one word,
no letter may be used more than once.
(we will not have a Qu letter like Boggle)
A word is accepted and the score increased if each of the following are true:
The word be made up from the dice on the board following the rules of Boggle
The word exists in the dictionary of words being used: BoggleWords
The word contains 3 to 16 characters (one and two letter words are not allowed)
It is not already in the accepted list (no duplicate words allowed)
1
pf3
pf4
pf5

Partial preview of the text

Download Boggle the Game - Program Design and Development - Final Project | C SC 227 and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

C Sc 227 Spring 2007 Final Project: Boggle

Due Dates (Bonus scheme and late day policy added 19-April)

Note: The syllabus states, "The final team project will have its own late policies". You cannot use any

personal late days for the final project. We have added a bonus opportunity.

The Model (70pts)

Tuesday 24-April, 2007 by 10:00pm

Wednesday 25-April, 2007 by 10:00pm

Thursday 26-April, 2007 by 10:00pm

Friday 27-April, 2007 by 10:00pm

After Friday

10pt bonus, 80/70 pts max

0pt bonus, 70/70 pts max

10pt deduction, 60/70 pts max

20pt deduction, 50/70 pts max

0 pts

The View (30pts)

Tuesday 1-May by 10:00pm

Wednesday 2-May by 10:00pm

After Wednesday

0pt bonus, 30/30 pts max

10pt deduction,20/30 pts max

0 pts

Collaboration

This final project is to be completed with one other person in pair programming

mode. All test and production code (or at least as much as is possible) should be

written with your programming partner. We will be meeting in 228GS for the final two

sections, but you will need to find time to work outside section

Boggle, the Game

The board game of Boggle has a

container that holds 16 dice that can be

"rolled". These 6-sided dice have letters

from which players try to find words.

Words are possible if letters line up next

to each other horizontally, vertically, or

diagonally. There are 3 letters that can

be connected to any letter on a corner, 5

for the other six letters on the borders,

and 8 for the middle four letters (there is

no wraparound). To make up one word,

no letter may be used more than once.

(we will not have a Qu letter like Boggle)

A word is accepted and the score increased if each of the following are true:

 The word be made up from the dice on the board following the rules of Boggle

 The word exists in the dictionary of words being used: BoggleWords

 The word contains 3 to 16 characters (one and two letter words are not allowed)

 It is not already in the accepted list (no duplicate words allowed)

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:

"LRYTTE" "VTHRWE" "EGHWNE" "SEOTIS"

"ANAEEG" "IDSYTT" "OATTOW" "MTOICU"

"AFPKFS" "XLDERI" "HCPOAS" "ENSIEU"

"YLDEVR" "ZNRNHL" "NMIQHU" "OBBAOJ"

Project and Folder Names to Use The Model: 24-April (for 10pt bonus):

B 1 _ SLName _ YourFirstName _ YourLastName _ PartnersFirststName _ PartnersLastName

The View: 1-May, 2007:

B 2 _ SLName _ YourFirstName _ YourLastName _ PartnersFirststName _ PartnersLastName

Grading Criteria added 19-April (Subject to change)

Note: A substantial portion of the grade (24/70pts) is related to the quality of your unit tests

Model 70 pts

____/+ 10 pt bonus for turnin by Tuesday, 24-April by 10:00 pm

____/4 You turned in a properly named and folder and Eclipse project that compiles and

it is a reasonable attempt to model and test the game of Boggle

____/6 You have a unit test for each class in your system (except Roller)

____/10 Your system accurately simulates Boggle's rolling of 16 dice (except for Qu)

Use the 16 dice values above, "roll" the dice using shuffle, and chose one letter randomly

____/6 Quantity of assertions: You tested every one of your methods in all classes (except Roller)

by calling every method in your system at least once.

____/24 Quality of Assertions: You thoroughly test every method in every class (except Roller).

There should be many assertions to see if words are or are not in the Boggle board.

There should be same letter cannot be used twice in the same word.

____/10 Good Style and Design, Unanticipated error which is defined as

 Your class has your name and a description of its purpose.

 Used intention-revealing names (meaningful identifiers).

 Used consistent spacing/indentation (format all code with Source > Format).

 Class names begin with an UpperCase letter

 All method and variable names begin with a lowerCase letter

 Placed one blank line between methods

 Used local variables when appropriate and instance variables when appropriate

 There are no unanticipated errors or breeches of good style or design

GUI due 1-May 30pts

____/2 A user can see the game GUI by running the file BoggleMain.java

____/4 The game responds to every user input of an attempt with the correct message (either one of

two messages is okay when the word is not in the dictionary and NOT in the boogle board)

____/4 You can see all elements of the game: the "dice", the list of correct words, and the results of

the game with the missed computer-generated word list.

____/4 Can end a game at any time and start a new game at any time

____/4 The Boggle board changes for each new game by simulating the roll of 16 Boggle dice

____/12 The game plays correctly and is robust. The GUI looks okay and it is easy to understand

how to play the game for those who have played Boggle in the past (subjective)