Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python question: 2 Part 2: Single Player Rummy Game with Dice and strange deck 80 points To clarify Part 2 specifications, I have provided sample

Python question:image text in transcribedimage text in transcribedimage text in transcribed

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 specifications in addition to what is explained in this document Here is the link to the video: https://youtu.be/Zw12qTyPnHo 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 ,a 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. Let's 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. 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+, 1 1 forms a progression. In our strange deck, 210, 1 10, 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

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions