This is a windows form application in C#
i have a higher/lower guessing game that is complete but i did not read the question carefully.
the question asks to allow users to keep guessing until thy guess the number. chooses two colors for your game: one should be used to indicate that the value the users guessed is higher than the target; the other is used to indicate that the value the users guessed is lower than the target. with each new guess, change the form color based on whether the guess is higher than the target or lower. keep count of the number of guess. when they hit the target, display a message box indicating the number of guesses it took.
my program only lets the user enter 3 tries, i have no color for the text and my message box says something like "You have won! Would you like to play again ?"
making this program was very difficult for me to make so i would like some help making these corrections.
Thankyou
Loading
Mamta MPosted Dec 9, 2010, 2:05 AM
You can draw a filled colored rectangle on the screen
In a textbox accept the user's input of the number guessed
In the code, check if the number entered is greater or lesser than the actual number
Depending on the result, color the rectangle appropriately (since you have fixed two colors, all you need to is refill the rectangle with the correct/wrong color).
Keep a counter variable to track the number of guesses and keep incrementing this counter.
Don't limit it to 3 tries but let the user continue till he wins.
At the end, display the value of the counter variable which will contain total number of tries taken.
Hope this helps.
-Mamta