The mission of this assignment is to realize a ‘Crazy Eights’ card game using a standard 52-card…

The mission of this assignment is to realize a ‘Crazy Eights’ card game using a standard 52-card deck. Read the specified link (wikipedia) or watch this video (and others too) to understand how this simple game works out. In this assignment, you will be playing with other 3 people whose card turns are automatically generated according to the next rules: find the same number of any suit find the same suit use any eight and declare the suit of the most occurring suit in hand (e.g., select H if HHHCCDS in hand) draw from the deck until finding any of the aboveYou need to implement the card selection in this order. Each player is given 6 cards at the beginning of the game. You are the first player, and anyone who used up all cards will win. Game also ends when all cards in the stockpile are used. You should check all the potential input errors. The first card in the pile may be a crazy eight, in which case use it as a selection condition of suit or reshuffle the pile to choose another non crazy eight card (choice is up to you).  Note that this version of Crazy Eight can discard only one card at a time and needs to draw from deck until an eligible card is found (added 5/1).You must display all kinds of transactions happening in the progress of the game. At your turn, typing ‘?’ will show hands of others (cheating option). The next session shows an example game sessions.  Observe carefully and adapt this output format as much as possible — points will be deducted if we found yours too much deviated from. Pile has S10 <--- your turn  (a) C3  (b) H3  (c) C8  (d) S3  (e) HK  (f) DQ  (g) drawWhich one to play? dPile has S3        Player 1 chose H8        Player 1 declared suite CPile has C*        Player 2 chose CJPile has CJ        Player 3 chose CKPile has CK <--- your turn  (a) C3  (b) H3  (c) C8  (d) DQ  (e) HK  (f) drawWhich one to play? aPile has C3        Player 1 chose CQPile has CQ        Player 2 chose D8        Player 2 declared suite SPile has S*        Player 3 drawing...        Player 3 chose S9Pile has S9 <--- your turn  (a) HK  (b) H3  (c) C8  (d) DQ  (e) drawWhich one to play? ?Player 1  (a) D9  (b) H4  (c) C4  (d) HAPlayer 2  (a) S7  (b) HJ  (c) SA  (d) SKPlayer 3  (a) H5  (b) H6  (c) H2  (d) DA  (e) H10Which one to play? e  (a) HK  (b) H3  (c) C8  (d) DQ  (e) D6  (f) drawWhich one to play? f  (a) HK  (b) H3  (c) C8  (d) DQ  (e) D6  (f) S5  (g) drawWhich one to play? fPile has S5        Player 1 drawing...        Player 1 chose S6Pile has S6        Player 2 chose S7Pile has S7        Player 3 drawing...        Player 3 chose D7Pile has D7 <--- your turn  (a) HK  (b) H3  (c) C8  (d) DQ  (e) D6  (f) drawWhich one to play? dPile has DQ        Player 1 chose D9Pile has D9        Player 2 drawing...        Player 2 drawing...        Player 2 drawing...        Player 2 chose C9Pile has C9        Player 3 drawing...        Player 3 drawing...        Player 3 drawing...        Player 3 chose S8        Player 3 declared suite HPile has H* <--- your turn  (a) HK  (b) H3  (c) C8  (d) D6  (e) drawWhich one to play? aPile has HK        Player 1 chose HAPile has HA        Player 2 chose HJPile has HJ        Player 3 chose H5Pile has H5 <--- your turn  (a) D6  (b) H3  (c) C8  (d) drawWhich one to play? bPile has H3        Player 1 chose H4Pile has H4        Player 2 chose HQPile has HQ        Player 3 chose H6Pile has H6 <--- your turn  (a) D6  (b) C8  (c) drawWhich one to play? bWhich suit you want? DPile has D*        Player 1 drawing...        Player 1 chose D5Pile has D5        Player 2 drawing...        Player 2 drawing...        Player 2 chose DKPile has DK         Player 3 chose D3Pile has D3 <--- your turn  (a) D6  (b) drawWhich one to play? aYou won![ Final card distributions ]Player 0Player 1  (a) C4Player 2  (a) SK  (b) C2  (c) SA  (d) S4Player 3  (a) H10  (b) SJ  (c) H2  (d) DAIn the game, Player 0 represents you and Player 1 through 3 are (machine-implemented) family member competitors. Refer to video lectures provided on April 10 and 15. Start early as one weekend not enough for the completion of the work although the total amount of coding is not more than 180 lines.

Leave a Comment

Your email address will not be published. Required fields are marked *