Description
Homework #5
Example:
This is a 6×6 puzzle. There are 4 words hidden in this puzzle. Words and their positions are:
• “hello” [d,0] & [d,4]
• “world” [b,0] & [e,4]
• “great” [a,0] & [a,4]
• “random” [e,5] & [a,5]
Note that: Row Numbers are denoted with letters a to z.
Assignment:
You will create a puzzle map with a 20×20 grid where each cell contains a character. To build a puzzle map, you must do the followings:
• You are given a list of 100 words. You will choose 10 random words from this list and place them in the puzzle table with random directions and positions. (Remember words can be scribed left to right, top-down, diagonally or in the reverse order of these directions)
• Following word placement, you will fill the rest of the board with random characters.
Gameplay: On each turn, the puzzle and the selected word list are printed on the screen with lowercase characters. Puzzle board should be printed with the corresponding coordinates as a chessboard.
The coordinate of the top-left corner should be a0 and the bottom right should be o14
All characters should be lowercase. The program asks for a word and a coordinate (r=row, c=column).
Example:
➢ Please enter the coordinate and the word:
➢ E5 random
As soon as the player enters a makes a guess, the program must search for all 8 directions If the guess is correct(both positions of the word are and list contains the word), the corresponding word on the
Page 1 of 2
board and the list must be converted to uppercase and reprinted. Otherwise, there is no change on board and the list.
Termination Conditions:
• The player finds all the words in the puzzle.
• Player types “Exit”.
General Rules:
1. Obey and do not break the function prototypes that are shown on each part, otherwise, you will get zero from the related part.
3. Note that if any part of your program is not working as expected, then you can get zero from the related part, even it’s working in some way.
4. Upload your .zip file on to Moodle to deliver your homework. The zip file must consist of three .c file that contains your solutions. Name format can be found on the top of this homework sheet.
5. You can ask any question about the homework by sending an email to madede@gtu.edu.tr or by using the forum in the Moodle page of the course.
Page 2 of 2
Reviews
There are no reviews yet.