Simplified Poker Game, MATLAB Programming

Assignment Help:
The game of Simpli ed Poker is a simple game by today''s standards. You start o with a standard
deck of cards, shue the cards, and then give each player 3 cards. Each card has a face value: Aces are worth 14, Kings
are worth 13, Queens are worth 12, Jacks are worth 11, and 2 through 10 are worth 2 through 10, respectively. If all of a
player''s cards have the same value, then the player has three of a kind. If only two of a player''s cards have the same value,
then the player has two of a kind. If no two of a player''s cards have the same value, then the card with the highest value is
the high card. In determining the winner, a three of a kind beats a two of a kind, and a two of a kind beats a high card. If
two or more players have a three of a kind, or two of a kind, then the player with the higher valued two of a kind or three of
a kind wins. It is possible for two or more players to win if they each have the same two of a kind or high card. At the end
of each round, all winners will say their personal catchphrase. To play another hand, shue the deck again and start over.
1. Write, and properly comment code to allow users to play Simpli ed Poker.
2. Your code should allow for X players, where 0  X  15, and 2 hard-coded computer players to play Simpli ed
Poker.
3. Each player has his or her own catchphrase and name. In the beginning of your code, you should input each user''s
catchphrase and name. The computer players'' catchphrases and names should be hard-coded.
4. Store all of the players'' names and their catch phrases in a single struct.
5. I have provided you with two functions that should help:
(a) getDeck.m : This function will return a struct for an entire deck of cards. You can use the command
\deck=getDeck;" to de ne a struct deck.
(b) shueDeck.m : This function will input a struct and randomize its order. You can use the command
\deck=shueDeck(deck);" to shue the deck previously de ned by getDeck.
6. At the beginning of each hand, shue the deck and assign 3 cards to each player. Then use the disp command to
display each player''s cards.
7. To see who won a particular hand, you will need to rst check to see if someone won with three of a kind. If there
are no three of a kinds, then check for two of a kind winners. Finally, if there are no three of a kinds or two of a
kinds, check to see which player has the highest card. (Remember, more than 1 player can win a round.)
8. Output which players have won and have them say their catchphrases via the disp command.
9. Finally, ask the user if they want to play again, and if they say yes, start another round. The user should not have
to re-enter the plauers'' names and catchphrases.

Related Discussions:- Simplified Poker Game

DC Motor, I need assignment to finish.

I need assignment to finish.

Matrices, use the loop for to produce [-1 -1 -1 -1; 0 -1 -1 -1; 0 0 -1 -1; ...

use the loop for to produce [-1 -1 -1 -1; 0 -1 -1 -1; 0 0 -1 -1; 0 0 0 -1]

sparse storage , Compare results/performance with tridiagonal Gaussian eli...

Compare results/performance with tridiagonal Gaussian elimination solver for the problem arising from -y''=f   on (0,1) with y(0)=0=y(1). You may also need to use sparse storage an

Solve for unknowns x and y from equations, Solve for unknowns 'x' and 'y' f...

Solve for unknowns 'x' and 'y' from Equations (1) and (2) using MATLAB. (However, if MATLAB is not the appropriate software to solve these two simultaneous equations, please sugges

Singal system , Q.1: Consider the transmission of a sinusoid x(t) = cos(2f...

Q.1: Consider the transmission of a sinusoid x(t) = cos(2f0t) through a channel a ected by multipath and Doppler. Let there be two paths, and assume the sinusoid is being sent fro

Implement a matlab function to calculate value, Implement a MatLab function...

Implement a MatLab function to calculate y.  The function should take two input arguments 1) A vector of parameters In the above example this would be of length 3, the first

Reading from a file, Reading from a File: A file has been once created...

Reading from a File: A file has been once created; it can be read into a matrix variable. When the file is a data file, the load function will read from the file filename.ext

Calculate the mean-mode and median, You are given data similar to the examp...

You are given data similar to the examples and sample problems in the statistics topic. Write MATLAB program to do the following: 1. Plot histogram, relative frequency histogram

Obtain the input - algorithms, Obtain the input - Algorithms: From whe...

Obtain the input - Algorithms: From where does the input come? The two possible choices would be from an external file on a disk, or from the user, who enters the number by ty

Steady-state conduction equation, Problem: Consider a trapezoidal piece of...

Problem: Consider a trapezoidal piece of polymer film as shown below. The parallel sides of the trapezoid are insulated and the temperature of the bottom and diagonal sides are f

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd