Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Game programming (http://www.go4expert.com/forums/game-programming-forum/)
-   -   Answer this question PLEASE (http://www.go4expert.com/forums/answer-question-t21377/)

gillie24 17Mar2010 04:44

Answer this question PLEASE
 
Question A

You are required to create a game that will operate as follow
  • The player will guess a number between 1 and 9
  • The computer will then select a random number between 1 and 9
  • The program will then compare the two numbers and if they are equal the player wins and his/her score is increased by 1. if they are not equal the computer score is increased by 1.
  • The player can exit the game by entering -1. when this occurs the players score and the computer score is displayed on the screen and the overall winner is congratulated via an appropriate message on the screen.
Question B

You are required to modify the above game so that instead of guessing numbers the player will guess a three letter word. You are required to ensure that the word enter has only three characters, otherwise allow the user to try again. You are required to create an array of string of size 10 of with three letter words will displayed to the user at the beginning of the game from which the player will select a word.

The word selected by the player and the one selected by the computer will be compared and the scoring is done similar to the one above. In case however, allow the user enter the number of times they desire to run the program.at the end of the game display the computer’s score and the player’s score and congratulation message to the overall winner.

shabbir 17Mar2010 09:18

Re: Answer this question PLEASE
 
Moved to Game Programming

Mike911 7Jun2010 11:07

Re: Answer this question PLEASE
 
random number to chars till 3chars
guess -> input 3 chars and verify them
computer -> generate 3 random chars


All times are GMT +5.5. The time now is 02:39.