Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 Part 2: Single Player Rummy Game with Dice and strange deck (80 points) To clarify Part 2 specifications, I have provided sample tests for

2 Part 2: Single Player Rummy Game with Dice and strange deck (80 points) To clarify Part 2 specifications, I have provided sample tests for each required function inside of its docstrings in a3_game_xxxxxx.py. Furthermore, you can find example run of the whole game below and its associated video at the link below. The behaviour implied by the sample tests/runs and the video should be considered as required spec- ifications in addition to what is explained in this document. Finally, you can also find one extra example run of the beginninng of the game that the end of the assgnment. Here is the link to the video: https://youtu.be/Zwl2qTyPnHo Description: A card in a standard deck has a suit (in particular, one of four suits: , , , ) and a rank (one of 13 ranks: A, 2, 3, ..., 10, J, Q, K). Taking every pair of a suit and a rank gives rise to a standard deck of (4x13=) 52 cards. Imagine you have access to only an old fashion terminal that cannot display fancy characters like: , , , but yet you would like to make a card game. You would first need to decide how to represent a card. One way to do that would be to represent a card by a 3 digit integer where the first digit (1 to 4) represents a suit and the two last digits (1 to 13) represent ranks. Lets call such a deck, a strange deck. For part 2 of the assignment, you will need to make a (heavily) modified version of Rummy card game with this strange deck. More specifically the deck will have 4 suits (indicated with first digit 1, 2, 3 or 4) and num ranks where num is given by the user and can be between 3 and 99, inclusively. In Rummy, the main goal is to build melds which consists of sets, two, three or four of a kind of the same rank; or progression, three or more cards in a sequence of consecutive ranks, of the same suit. So the set 10, 10, 10 forms three of a kind. And the set/sequence 7, 8, 9, 10, 11 forms a progression. In our strange deck, 210, 110, 310 would form three of a kind (since the first digit is a suit, so the ranks are 10, 10, 10) and the set 309, 307, 311, 308, 310 is a progression (since they all have a suit 3 and 07, 08, 09, 10, 11 is sequence of consecutive integers). Note that 201, 302, 303 is not a progression. Although 01, 02, 03 is a sequence of consecutive integers, the three cards do not have the same suit (some have suit 2 and some 3) so this is not a progression.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

2nd Edition

0471180742, 978-0471180746

More Books

Students also viewed these Databases questions