{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

19-Section-Handout - CS106X Autumn 2009 Handout 19 Section...

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

View Full Document Right Arrow Icon
CS106X Handout 19 Autumn 2009 October 19 th , 2009 Section Handout Problem 1: Creating Word Wreck Tangles Several summers ago, I discovered a dashboard element for my Google Home Page that served up a new type of puzzle every week. One of these puzzles was the Word Wreck Tangle, and it looked like this: The goal of the game is to slide each of the 18 letters around the perimeter into the board in such a way that you’re left with a grid of nine overlapping words—four across and five down. Here’s the solution: Here’s what I want to know! How do people find these boards in the first place? Are some people so inventive that they can just see that scabs stacked on top of tacit on top of array and geese just so happens to give you five four-letter words as well? Is it really that obvious?
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 Perhaps to some, but it needn’t be, because we have recursive backtracking and the programmatic ability to generate a word wreck tangle, see what it gives us, and then pretend we didn’t use a computer but just found it own our own. Your job here is actually a pretty tough one: write a recursive procedure that takes an empty Grid<char> (actually, it’s a Grid<char> of space characters), and populates it
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 ]}