Anyone can help me to finish this c++ question? Please contact me by email.
UNO
UNO is one of the world's most popular family card games, with rules easy enough for kids, but challenges and excitement enough for all ages.
In this assignment, we will program a simplified version of UNO. Most of the cards are of four different colors: red, green, blue and yellow. For each color, there are one zero, and two for each value from 1 to 9, i.e. altogether 19 cards for one color. In addition, there are some function cards, but we used only one special card ?Draw 4? in this assignment and we have four ?Draw 4? cards in total. Thus the total number of cards in a deck is thus 80.
The whole deck of cards is first shuffled and piled together. Each player is dealt 7 cards with the remaining ones placed face down to form a "draw" pile. The top card of the draw pile is turned over to begin a "dis-card" pile. The first player has to match the card in the discard pile either by number or color. For example, if the card is a red 7, player must throw down a red card or any color 7. Or the player can throw down a special Card. If the ?Draw 4? card is used, the player following the issuer have to draw 4 cards from the deck. If it happens that the next player also used the ?draw 4?, then the cards to be drawn by the player following the next player will accumulate. If the player doesn't have anything to match, he or she or it must pick a card from the draw pile. After that, play moves to the next person.
If a player fails to match the number card in the discard pile, the player has to draw one card from the "draw" pile.
Once a player has no card left, the game is over and he or she or it will be the winner. There may also exist a situation that all the cards from the draw pile are exhausted. In this case, the player with the least number of cards will be the winner.
Please note that there is no "cut" action in order to simplify your task. In addition, the first card in the "dis-card" pile could be a "Draw 4" card too. In such case, the first player has to act as if the predecessor issued a "Draw 4". There are altogether 4 players: the first three being the computer while the last one being the hu-man player. Computer player should play first. They are not expected to show any intelligence but they must follow the rule of the game.
Requirement
Write a C program to simulate the above game on the computer. The simulated game will have 4 play-ers?one of the players is the program user and the remaining players will be the computer itself i.e. you should write the code for all the computer players in throwing or drawing cards.
To increase the viewing fun of the process, use the full-screen control functions that are provided with the assignment. The screen control functions are only a few:
- clear screen function,
- move cursor function.
- set_text_color function
Your program should read a parameter to control the pace of execution. The delay can be inserted by calling Sleep() function. The information of Sleep is as below.
void Sleep(int);
/************************************************************
* Sleep(time)
*
* - Delay the program for time millisecond
*
* - input: (time) delay time in milliseconds
************************************************************/
Finally your program should have the following features:
- You must use structure of C to perform the card processing.
- Your program should at least consist of 2 functions reasonably.
Source: http://www.daniweb.com/software-development/cpp/threads/453562/c-programming
jetblue jetblue michelle malkin october baby sugarland 16 and pregnant ludwig mies van der rohe
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.