Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are the dealer in Texas Hold em Poker. Your duty is to deal two cards to each player and then deal three community cards,

You are the dealer in Texas Holdem Poker. Your duty is to deal two cards to each player and
then deal three community cards, all from a single deck. This renders a hand of five
non-repeating and non-duplicatory cards.
A deck of cards consists of numeric cards from 1(Ace) to 10 as well as three face cards (Jack,
Queen, King), of four different suits (spades, clubs, diamonds, and hearts). In total, this renders
52 unique cards.
Write a program which deals (i.e. prints to the terminal) a hand (2 cards) for at least one player,
as well as the river (3 cards). At minimum, this is 5 random cards total. Your program should
deal different cards every time the program is run (do not choose a set of 5random cards to
deal and just print out the same five cards).
Expected output:
River Cards:
Ace of Spades
2 of Hearts
King of Hearts
Player Cards:
3 of Spades
7 of Diamonds
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Incorrect Output:
2d 13d [face cards should display the face, not a numerical representation]
[ use strings for the suits, not singular characters]
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 of Diamonds [ repeating cards]
2 of Diamonds
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Ace of Spades [not random]
2 of Spades
3 of Spades
//////////////////////////////////////////////////////////////////////////////////////////////
7 of Clubs
3 of amonds [if you have non ascii characters in your output, fixit!

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

How To Make A Database In Historical Studies

Authors: Tiago Luis Gil

1st Edition

3030782409, 978-3030782405

More Books

Students also viewed these Databases questions

Question

How to prepare washing soda from common salt?

Answered: 1 week ago

Question

Explain strong and weak atoms with examples.

Answered: 1 week ago

Question

Explain the alkaline nature of aqueous solution of making soda.

Answered: 1 week ago