Find Jobs
Hire Freelancers

Writing C++ code for game to find words inside a word

$30-50 USD

Completed
Posted over 15 years ago

$30-50 USD

Paid on delivery
Need done before 9/23 by Midnight Central time. Writing C++ code for a game that picks a word at random from a file. The user is playing the computer, and the user trys to find words out of that 1 word. For example, the word 'football' was randomly picked. So the user can choose: ball, foot, etc. Then once the user is done. It is the computers turn and it will find all the other remaining words the user did not. There is also a point system explained in further detail in the 'Deliverables'. Should not be that difficult for advanced c++ experts. ## Deliverables Writing code for a game. General rules of the game are trying to find words inside another word. Can not use arrays, have to use STL classes. Container, iterators, and algorithms. I have 2 files, A [login to view URL] file full of words( to check to the words once the user/computer enters them ) and a [login to view URL] file containing the game words. I need to read in the game words from the file and randomly display( random_shuffle STL algorithm.) one to the user. Then show a menu for the user. The user can either: (1)enter the words, (2)print all the words they have currently found(with there score, which is 1 point for the word and 1 point for each additional letter over the minimum of 3), (3)finish the player's turn(and now the computers turn to find words the user did not), or (4)exit the game. If the user chooses to enter a word, then the program should read in the user’s word and check it for validity. If a word meets the minimum length requirement (which is 3), has not been guessed before, and can be formed from the letters contained in the game word, then it is a legal guess. Remember, your guesses are not only limited to the letters contained in the source word, but also to the number of occurrences of each letter in the source word. Then the word is checked against the list of legal words in the dictionary. If it exists, the word is added to the player's word list, and points are awarded according to the word's length. If the word doesn't appear in the lexicon, the player is chided for trying to pull a fast one on the computer. After performing the user’s selected action, the game word and menu should be displayed again. Once the user has given up and the computer is done another randomly selected game word should be displayed to allow a new game to begin. You should play as many games as the user wants before exiting the game. During initialization, you read the game words file and store it into a suitable data structure for subsequent use. Once your initialization is complete, you’re ready to implement the recursive search that will take a given word and see if can be formed with the current game word. When writing this I am an expert at c++, as you can see, so please try not to use code that I would not understand yet. Try to make it as simple as possible thanks, with comments so I can understand it. Thanks ## Platform I use Microsoft Visual C++ 2008 Express Edition. So it should be able to run on that.
Project ID: 3244206

About the project

2 proposals
Remote project
Active 16 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$38.25 USD in 14 days
4.8 (4 reviews)
2.3
2.3
2 freelancers are bidding on average $40 USD for this job
User Avatar
See private message.
$42.50 USD in 14 days
5.0 (8 reviews)
2.8
2.8

About the client

Flag of UNITED STATES
Florence, United States
5.0
1
Member since Sep 21, 2008

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.