1
Reply

Designing a game ? help required ? in C

SUNIL GUTTA

SUNIL GUTTA

Oct 24 2013 9:20 AM
1.1k
Hi 

My requirement doc (trying to do hoping it would be fun) 


1.) Create a C program that plays "Go Fish" for a 2 person game (The user and computer).
2.) When the game starts have the computer create a deck of cards and deal 10 cards to the user and to the computer.
3.) Display the dealt hand(s): The remaining cards are put into a Draw Pile. Create a statement at the top your program that looks like this: #define DISPLAY 1
a. if DISPLAY is set to 1 then display all user's and computer's cards.
b. If DISPLAY is set to 0 then display only the user's cards.
4.) Each player counts the number of pairs he/she has and removes those cards from their hand into a User Pair Pile and a Computer Pair Pile (display the User's pile and Computer's pileon the screen!). The players get a point for each pair, display these points on the screen.
5.) The user starts first and requests a card from the computer. Incorporate a check to ensure that the user does have a card with the same face value.
6.) If the computer has a matching card, it must be handed over to the user, if not the user must draw the first card from the draw pile.
7.) If the user can make a match, he/she does puts the matched pair into the User Pair Pile. Each match gets a point.
8.) Play now passes to the computer and the computer requests a card from the user.
9.) Track and display the number of points for the user and computer.
10.) Once all the pairs are made, the game is over and the winner is declared based on the number of matches made.
11.) Track and display the number of times the computer and user has won. You may
start at zero at the start of the game.
12.) After a game is over, you should query the user to continue playing or exit the program.
14.) Allow the user to exit the game and restart in the same place anytime they want (not just at the end of a game, but in the middle of the game). In other words, during a game the user can exit the program, then restart the program at the very place where they left. You must keep track of the user hand, computer hand, draw pile, and both pair piles along with all the game statistics. Be sure to display these statistics.

MY EFFORT : i tried to write in some way i went no where ,, finally my code is useless as said by instructor :( so help required :) anyone show some light ,, 
Cheers
Thank you


Attachment: what i tried code.rar

Answers (1)