Completed

Simple Custom Project Nov 19 2011 13:02:22

(i started the project but am really stuck its due tomorrow would you be able to take the job .. the files contains the clues txt file and what i have so far ..

Write a crossword puzzle program that allows you to play an existing crossword puzzle, where the clues and the contents for the crossword puzzle come from a file. Write your program in stages as described below.

Stage 1 (15 points):

Read crossword puzzle information from a file and display it as a crossword board.

For this stage assume the crossword puzzle clues are stored in a file called "clues.txt". For example this file could contain the following:

hexadecimal a1 a base 16

asterisk g4 a catch with an _

ampersand a4 d pass with an _

bit d1 d 8 _s make a byte

byte d1 a does your cyber-dog _?

seo d6 a office in 917 _

sense c7 d common _

kilo f9 d K, as in _bytes

The first 11 characters are the word (e.g. "hexadecimal"). All words must be of size 11 or less. After a space, the next two characters (e.g. "a1") are the row ('a') and the column ('1') where the words starts. After a space the next character ('a') is the direction of the word, where 'a' means across, and 'd' means down. After a space the next 25 characters (or less) store the text of the clue for that word.

Read in the contents of this file and use it to create and display the board. See the bottom of this page for the attached program [url removed, login to view] which illustrates part of what you need to read the input file. In the case of the above file, running the program would look like the following:

About to read from input file...

0 1 2 3 4 5 6 7 8 91011

a * h e x a d e c i m a l

b * * * * m * * * * * * *

c * * * * p * * s * * * *

d * b y t e * s e o * * *

e * i * * r * * n * * * *

f * t * * s * * s * k * *

g * * * * a s t e r i s k

h * * * * n * * * * l * *

i * * * * d * * * * o * *

j * * * * * * * * * * * *

k * * * * * * * * * * * *

l * * * * * * * * * * * *

ACROSS:

Row Col Clue

0. a 1 base 16

1. g 4 catch with an _

4. d 1 does your cyber-dog _?

5. d 6 office in 917 _

DOWN:

Row Col Clue

2. a 4 pass with an _

3. d 1 8 _s make a byte

6. c 7 common _

7. f 9 K, as in _bytes

Note that there is a maximum of 8 across clues, and a maximum of 8 down clues. You may assume that the data file is always correctly formatted. You must store the board as a two-dimensional array. I suggest you create two separate arrays in which to store the across and down clues. Number the clues sequentially as found in the original clues file. These numbers will be used to later uniquely refer to the clues when guessing words.

Stage 2 (15 points):

Allow solving a crossword puzzle

For stage 2 the empty board containing asterisks and appropriate blank spaces and the clues are displayed. This looks like the following:

0 1 2 3 4 5 6 7 8 91011

a *

b * * * * * * * * * * *

c * * * * * * * * * *

d * * * * *

e * * * * * * * * *

f * * * * * * * *

g * * * *

h * * * * * * * * * *

i * * * * * * * * * *

j * * * * * * * * * * * *

k * * * * * * * * * * * *

l * * * * * * * * * * * *

ACROSS:

Row Col Clue

0. a 1 base 16

1. g 4 catch with an _

4. d 1 does your cyber-dog _?

5. d 6 office in 917 _

DOWN:

Row Col Clue

2. a 4 pass with an _

3. d 1 8 _s make a byte

6. c 7 common _

7. f 9 K, as in _bytes

Please choose the number of a word to guess or x to exit -> 3

Please enter your guess: hits

Sorry, 'hits' is not correct. Press enter to continue...

Then the screen is cleared and play continues. When a word is guessed correctly, it is then subsequently stored on the board every time it is displayed that game. Correctly guessing all words offers a congratulatory messag

Skills: C Programming

See more: program crossword 91011, write a bit or bit, use case simple example, o 1 space, input board game, data stage 8.1, data cpp, custom word puzzle, cpp program example, cpp data, cpp array, b.c. job board, array in cpp, $1 k means, h game, part time input data, custom write, a1, simple 6 page, seo j, row b, r j, puzzle game project, project office, project board

About the Employer:
( 2 reviews ) chicago, United States

Project ID: #1301513

Awarded to:

deadhunt

Hired by the Employer

$50 USD in 1 day
(44 Reviews)
5.4