{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


21-Assignment-3-Boggle - CS106X Winter 2008 Handout 21...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS106X Handout 21 Winter 2008 February 1, 2008 Assignment 3: Boggle Thanks to Todd Feldman for the original idea behind the Boggle assignment. The Game of Boggle Those of you fortunate enough to have spent summers seeing the world from the back of the family station wagon with the 'rents and sibs may be familiar with Boggle, the little word game that travels so well, and those who didn't will soon become acquainted with this vocabulary-building favorite. The Boggle board is a 4x4 grid onto which you shake and randomly distribute 16 dice. These 6-sided dice have letters rather than numbers on the faces, creating a grid of letters on which you form words. In the original version, the players all start together and write down all the words they can find by tracing by a path through adjoining letters. Two letters adjoin if they are next to each other horizontally, vertically, or diagonally. There are up to eight letters adjoining a cube. A letter can only be used once in the word. When time is called, duplicates are removed from the players' lists and the players receive points for their remaining words based on the word lengths. Due: Friday, February 8 th at 1:15 p.m. Your assignment is to write a program that plays a fun, graphical rendition of this little charmer, adapted to allow the human and machine to play pitted against one another. As you can see from the screen shot above, the computer basically trounces all over you, but it's fun to play anyway. The main focus of this assignment is designing and implementing the recursive algorithms required to find and verify words that appear in the Boggle board. Because we want you to concentrate on the strategy section, we have given you two modules to start with, the gboggle module, responsible for the graphics, and the lexicon module
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 which is responsible for keeping track of a list of legal words (both of these are discussed later). There is still a lot of work left for you, so definitely do not postpone this assignment until the night before! How's this going to work? You will read the letter cubes in from a file and shake the cubes up and lay them out on the board graphically. The human player gets to go first (nothing like trying to give yourself the advantage). The player proceeds to enter, one at a time, each word that she finds. Your program is to verify that the word meets the minimum length requirement (which is 4), has not been guessed before, is a legal word according to the lexicon, and can, in fact, be formed from the dice on the board. If so, the letters forming the word are highlighted graphically, the word is added to the player's word list, and she is awarded points according to the word's length. The player indicates that she is through entering words by hitting a lone extra carriage
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 7

21-Assignment-3-Boggle - CS106X Winter 2008 Handout 21...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online