473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Needs help on making a "text twist" game within 24 hrs. *crying*

hpbutterbeer
We have a Machine Project and my brain is currently in a clouded state. Sorry, I'm just a beginner in C Programming...

Text twist is a windows game whose main objective is to form words out of the letters shown on the screen, you move on to the next level when you are able to form a word with all the letters given. In the actual game you click on the letters of the word, in this text version you simply type the words.

To be able to facilitate the game you need to create a dictionary, this will be the basis of the words to be guessed during the game. The dictionary has the following functions:

1. Add Word. This function allows the user to add new words to the dictionary. Your program should not allow duplicates. Each word consists the following fields:
a. Word – The word itself. Maximum of 7 letters.
b. Type – The type of part of speech of the word (e.g. noun, adverb)
c. No of Letters – The number of letters the word has not including ‘\0’. This will be useful during the game, rather than using strlen all the time.
d. No. of definitions – Some words may have multiple meanings, in which case ask for he number of definitions the user wishes to enter.
e. Definitions – This is an array of strings, each definition has a maximum of 50 characters and each word has a maximum of 5 definitions.
2. Delete Word. This function deletes a particular word from the dictionary.
3. Modify Word. This function modifies the fields of a word in the dictionary. The user is asked which word he/she wishes to modify, the system prompts for new values for the fields of the entry, it is similar to add except the contents are overwritten.
4. View. This function allows the user to view the contents of the dictionary. It consists of the following sub-functions.
a. View All. Views all the words and their meanings.
b. View by Type. Asks the user for a part of speech, and then displays all the words that fall under that category.
c. Search. Asks the word for an exact word, and displays all the related fields, if it does not exist it will report it to the user.
d. Search Substring. The user is asked only part of a word, a substring, and all the words that contain the substring are shown.
5. Sort. Sorts the array based on the words arranged in ascending order.
6. Save*. Saves the dictionary to a text file (dict.txt)
7. Load*. Loads a file and overwrites all he existing data in the memory with the data in the file.
8. Exit Dictionary.

GAME*

The game itself will start by selecting a word that consists of 7 letters, if there are no such words it will not continue with the game. After, the system selects words in the dictionary that can be formed from the 7 letters. These words are hidden from the user by replacing each word with an asterisk.

To enter a word the user types the word which can formed using the 7 letters, it is then printed on the screen and once the player presses enter it is checked if it in the dictionary. If it exists, then the number of letters of the formed word is added to the score and the asterisks are now replaced with the entered word. The player moves automatically to the next level if he can guess the 7 letter word correctly. To help the user he/she can press the space and the scrambled letters exchange places. There is no timer required for this game.

After each level the player is asked if he/she wants to see the definition of the words he or she was not able to guess. If the user wants to give up, he/she can press Esc, this terminates the game, if the user gets a score greater than 50 he or she is added to the list of High Scorers, there are an unlimited number of High Scorers, so use a linked list of structures.

THIS IS ONE OF THE "OUCH" PARTS: Do not use break (except within switch statements), goto label, exit, and return (except for non-void functions). Note that using gotoXY is acceptable.

please help! any tips for more added features? *needs them badly* thank you!!!
Oct 31 '06 #1
1 4380
Oh,sorry,forgot... I got a problem with randomizing the letters and how to modify,delete,definitions and add words using arrays for the dictionary.and how the scores will make an appearance whenever answered correctly.
Oct 31 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Irene | last post by:
Hi, I would like to modify the text within an html title tag based upon a value read from the registry (or the existence of a certain file). For example, if a certain registry value is equal...
7
by: Jukka K. Korpela | last post by:
No, I'm not making this up, this is what http://www.w3.org/ says when accessed with a text browser, or in any decent browser in no-images mode: "Tim Berners-Lee smiling 2003-12-31: Buckingham...
9
by: Arash Dejkam | last post by:
Hi All, Is it possible to write on an <OBJECT type="text/html"> using document.write() from within the html containing that tag the way we write on a popup window? I couldn't do that after a lot...
3
by: comp.lang.php | last post by:
PHP 4.3.8 with UNIX with option --with-magic_mime echo mime_content_type('/images/myimage.png'); // RETURNS "text/plain" PHP 4.3.11 with UNIX with option --with-magic_mime echo...
1
by: Christopher P. Winter | last post by:
I'm seeing some unexpected behavior with Text-indent, as shown on this page: http://www.chris-winter.com/Digressions/HP_Kayak/My_Kayak.html I set up the following style rules for footnotes: ...
13
by: j_ruez | last post by:
I am trying to learn the best ways to do some things in c# When testing for an empty string, what is the best way to test it. For example, if I have a textbox named txtValue Should I use ...
0
by: RON | last post by:
I have to read a long text field (it's a PDF) from SQL Server in a VB.NET (2003) app. Here's the code I have: Sub GetPDF(byval Path as string) 'objConnection created elsewhere; not the problem...
0
by: RON | last post by:
have to read a long text field (it's a PDF stored in a column) from SQL Server in a VB.NET (2003) app. Here's the code I have: Sub GetPDF(byval Path as string) 'objConnection created elsewhere;...
16
by: mj.redfox.mj | last post by:
Can anyone help? I have a textbox which I'm programatically adding by using the following code: txtTest = New TextBox txtTest.ID = "txtLeft" + cntCount.ToString...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.