Hidden Word Puzzle (2024)

HIDDEN WORD PUZZLE


INTRODUCTION

There is a kind of word puzzle where a list of words is hidden amongrandom letters and the goal is to find the hidden words. For example, thepuzzle:

H T A B N B

N E P I O L

C A T R S X

F S E D I L

K E E M N M

O L R I C Z


contains the hidden words: CAT, PEN, BIRD, SON, MIX, MORE, TEASE,TAB, LID, MEEK.

Within the puzzle square the words may be oriented forwards, backwards,up, down, or diagonally (right & down, left & down, right &up, left & up). (NOTE: The example above is a 5 x 5 square, a verysmall one. 20 x 20 is a better size. People usually have more trouble findingsmall words in the puzzle than big words.)

ASSIGNMENT

You are to write a program to create a hidden word puzzle. This willdemonstrate your understanding of two-dimensional arrays, strings, andfile input.

First you must invent a list of words to hide. The list should havea minimum of ten words, twenty is better. Usually the words are chosenaround a common theme such as wild animals, famous gangsters or politicians,volleyball, rock bands, etc. Be sure to include a few long words. Usinga text editor, enter the words into a datafile, one word per line.

REQUIREMENTS

The program may use a constant puzzle size, but ideally the programshould prompt the user to find out what size square to construct. Similarly,it would be nice to allow the user to enter the name of the data file.

The program builds the square by reading one word at a time from thefile. The program must assign the word a random location and random orientationin the square. The program must make sure the word actually fits withinthe puzzle boundaries (there are many ways to accomplish this - use whicheveryou think is best). After a place has been found for the word, the programshould output the word, the row and column position of it's starting letter,and optionally, it's orientation.

When all the words in the data file have been processed, print the square,showing dashes (or some other neutral character) for empty cells. Yourprogram should then fill the empty cells by assigning them random letters.(Extra credit: Have the random assignment follow the distribution of occurrenceof letters in natural English text).

Finally, print the completed square centered on the page (though you'llprobably want it left justified for screen display during testing). Optionally,underneath the square list the hidden words, four words per line and doublespaced, in columns which are centered on the page.

For example, during construction of the square above the program outputmight appear as:

HIDDEN WORD PUZZLE PROGRAM

*** Enter words data file name:

WORDPUZZ.DAT

*** Please enter an integer between 1 and 50 for the size

of the square: 6

CAT is located at 3,1 oriented Forwards.

PEN is located at 2,3 oriented Backwards.

BIRD is located at 1,4 oriented Down.

....

*** All words processed ***

- T A B N B

N E P I O -

C A T R S X

- S E D I L

K E E M - M

- - - - - -

*** Assigning random letters to empty spots now.

The completed puzzle, compliments of JD

H T A B N B

N E P I O L

C A T R S X

F S E D I L

K E E M N M

O L R I C Z

The hidden words are:

CAT PEN BIRD SON

BORE TEASE TAB LID

MIX MEEK

ERROR CONDITIONS

1) Reject input for square size outside range 1 to 50.

2) Terminate gracefully if the data file is

a) missing.

b) has no words.


3) Reject (with a message) words that are

a) too small (1 character long).

b) too long (greater than the square size).


OVERLAPPING WORDS

To simplify the program, words MAY overlap at any time. It is NOT necessaryfor words which cross over each other to share common letters, as CAT andTEASE do in the example. (Being able to share letters is a MUCH more complicatedproblem). Your algorithm does not even have to check if the cells are occupiedbefore it assigns a word. Words which are assigned early in the processmay get clobbered by subsequent words -- that's okay.



Hidden Word Puzzle (2024)
Top Articles
Historic assembly sets United Methodists on new path
SSM Health MyChart - Login Page
Cecil Burton Funeral Home | Shelby, North Carolina
Hickory Back Pages
19 Awesome Things to Do in Redmond, Oregon
Www Craigslist Com Juneau
Shiftwizard Login Wakemed
One Hour Rosemary Focaccia Bread
SSD an SATA Anschluss bei Futro S920
Premier Double Up For A Buck
Chesapeake Wv Topix
Schuylkill County Firewire
Does Publix Pharmacy Accept Sunshine Health
gameplay:shiny_pokemon_and_luck [PokéRogue Wiki]
Cbs Fantasy Trade Values
Mandy Sacs On BLP Combine And The Vince McMahon Netflix Documentary
What Is a Food Bowl and Why Are They So Popular?
For My Derelict Favorite Novel Online
Rimworld Prison Break
Rugged Gentleman Barber Shop Martinsburg Wv
Does the MLB allow gambling? Here's what to know about League Rule 21
Party City Enfield Photos
Nancy Pazelt Obituary
Juanita Swink Hudson
The Blind Showtimes Near Showcase Cinemas Springdale
New from Simply So Good - Cherry Apricot Slab Pie
Craiglist Rhode Island
Https //Pay.instamed.com/Tricore
Luciipurrrr_
Dollar Tree Hours Saturday
WhirlyBall: next-level bumper cars
Todos los dress codes para hombre que existen, explicados
9294027542
My Eschedule Greatpeople Me
Bodek And Rhodes Catalog
Oakly Rae Leaks
Thomas E Schneider Jeopardy
Wlox Jail Docket
Tcc Northeast Library
Upc 044376295592
Briggs And Stratton 125Cc Lawn Mower
Mensenlinq: Overlijdensberichten zoeken in 2024
Rydell on LinkedIn: STARTING TODAY you no longer have to wait in a long line to get your oil…
Molly Leach from Molly’s Artistry Demonstrates Amazing Rings in Acryli
Busted Magazine Columbus Ohio
Eurorack Cases & Skiffs
Flow Free 9X9 Level 4
Understanding DeFi The Roles, Tools, Risks, and Rewards of -- Alexandra Damsker -- 2024 -- O'Reilly Media -- 9781098120764 -- 79accdb00af9d0f41d97f44fa7970ff1 -- Annas Archive - Biblioteconomia
J&J News Bluefield Wv
Bòlèt New York Soir
Lubbock Avalanche Journal Newspaper Obituaries
Richy Rich Dispensary
Latest Posts
Article information

Author: Fredrick Kertzmann

Last Updated:

Views: 6026

Rating: 4.6 / 5 (46 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Fredrick Kertzmann

Birthday: 2000-04-29

Address: Apt. 203 613 Huels Gateway, Ralphtown, LA 40204

Phone: +2135150832870

Job: Regional Design Producer

Hobby: Nordic skating, Lacemaking, Mountain biking, Rowing, Gardening, Water sports, role-playing games

Introduction: My name is Fredrick Kertzmann, I am a gleaming, encouraging, inexpensive, thankful, tender, quaint, precious person who loves writing and wants to share my knowledge and understanding with you.