Brief description:
You will write a C code for a hangman game between the computer and a player but where the computer is
"cheating" .
Game Description:
At the beginning of the game the player choses how many letters he wishes the word to have, that he will guess ,
how many rounds he will have in the game and the name of the file containing the dictionary .
In the classic game of hangman , the computer picks a word and displays it on the screen with dashes instead
for letters . In each round the player guesses a letter,and if that exists in the word , then it replaces
the corresponding dash. The player wins if he could guess all the letters in the available rounds .
In the game that you will create, the computer steals . For example , suppose the player
already guessed all the letters except one, has only one round , and so far the word is
as-en. There are only two words in the dictionary matching : ashen and aspen. The program must
be written so that if the player guessed h, the computer will claim that the word was chosen
was originally aspen, while if the player guessed p, the computer will claim that the word was ashen. Thus,
the player has no hope of winning .
At the beginning of the game , the computer only knows how many letters must be the word , but did not
Choose something . Once the player guesses the first letter , the computer divides all words
categories ( " equivalence classes " ) depending on the existence or not of the letter , and the locations in which
will appear . For example , suppose that the dictionary has only the following 10 words :
arts, dear, deer, feel, flew, pear, pend, perk, poor, rear
The player in the first round guesses 'e'. The computer should display the points of the word
in which they have the letter 'e' . How the computer would do that if he didn't even choose the word?It will split the available words in
categories according to the positions in which there are 'e'.
The categories are:
---- (Words without e: arts, poor)
-e - ( words where e appears only in the second place : dear, pear, pend, perk, rear)
-ee-( words where e appears in 2nd and 3rd place : deer, feel)
- e-( where the words appear to e 3rd place : flew)
Each category is represented by one representative . For example, the representative of the first
class is the word " ---- " . The computer can now choose a category of words, and also
to display 'e' to the corresponding positions . There are several strategies , but we will follow the simplest :
each time the computer chooses the largest category. Therefore, in this example
will choose the category with representative -e -. The final word will be one of the dear, pear, pend,
perk but of course not yet chosen one particular of them.
Suppose now that the second round of the player guesses r. The new categories are:
-e - ( words without r: pend)
-er ( words which r appears only in 4th place : dear, pear)
-er-( words which r appears only in 3rd place : perk)
re-r ( where r words displayed in the 1st and 4th place : rear)
This time , the most populous category is -e-r, and possible words are dear and pear.
Suppose that in the third round , the player guesses f. F does not exist in any word , so I found
only one class :
-e-r ( without words f: dear, pear)
The game will continue the same way . If you run out of rounds without finding the word the player , and
last category has more than one word , the computer selects one of them at random
and argues that this was the word that had guessed from the beginning.
Then , it asks the user if he wants to play more game . If not, the program terminates . If so , the
process is repeated....( the continue is in the file named "project2013")
I have attached 3 files the 2 of them will be needed for the code and the file named "project2013" gives more details for how to program the game.
Hi, I am placing my bid on your project because I have read the requirements and I am confident enough with my C and algorithm skills. I am focused mostly on doing computer science homework here in freelancer.com and I would like to help you get this project done if you would give me the opportunity. I am a computer science professor and practitioner and this assignment is one of the fields that I teach very well so I can assure you an accurate result.
€30 EUR in 1 day
4.9
(431 reviews)
6.7
6.7
13 freelancers are bidding on average €28 EUR for this job
Hi,
I am an electronics engineer with more than 5 years of experience in C and I've written similar code for hangman in Python.
And this task seems to be a very simple task.
Kindly let me know, if you are interested...
Thank You
hi ka8igitis,
i am interested on it. Professional freelancer ready for help you. I am experience with C Language ...pointers , structs and arrays are not problem for me. Lets Start!
HI
I am experienced programmer and I have all my projects in programming you can view them
contact me for your solution
i will available for the best solution
thanks
Looks interesting, so I already started implementation and I will finish it anyway, I have like 167 lines of code for your project and if you choose me, you will get the source. I have no reputation here, so I put the minimal price. Cheers!