Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In C++ Language, create a text art-based “Spades” Game for 4 players. The game s

ID: 3911217 • Letter: I

Question

In C++ Language, create a text art-based “Spades” Game for 4 players. The game should allow the users to play the game multiple times until they select not to play again.

Spades is a card game that requires 4 players and is played in pairs. The objective of the game is to reach 500 points by collecting more books also known as tricks than your opponent. You obtain books by trying to reach the amount you bid prior to your hand being played. You receive a bag when you get a book more than you bid. Each book is worth 10 points and each bag is worth 1 point. It must be a standard 52-card deck.4l 1. Each player bids the number of tricks they expect to take. The player to the left of the dealer starts the bidding and bidding continues in a clockwise direction, ending with the dealer. As Spades are always trump, no trump suit is named during bidding as with some other variants. A bid of "zero" is called "nil"; the player must bid at least one if you don't want to bid "nil"* 2. Each hand consists of a number of tricks (the 4-handed game contains 13 tricks using all 52 cards). The player on the dealer's left makes the opening lead by playing a single card of their choice. Players in clockwise fashion then play a card of their choice; they must follow suit, if they can, otherwise they may play any card, including a trump Spadee common rule is that a player may not lead Spades until a Spade has been played to trump another card. A player cannot lead Spades in the first HAND.d 4. A partnership reneges on their contract if they violate the rules of play; most often this happens when a player plays off-suit when they could have, and therefore should have, followed suit. ^ 5. A 100-point penalty when 10 bags are accumulated and the ones place rolls over.

Explanation / Answer

While Poker is played in innumerable forms, a player who understands the values of the Poker hands and the principles of betting can play without difficulty in any type of Poker game. Except in a few versions of the game, a Poker hand consists of five cards. The various combinations of Poker hands rank from five of a kind (the highest) to no pair or nothing (the lowest):

Five of a Kind – This is the highest possible hand and can occur only in games where at least one card is wild, such as a joker, the two one-eyed jacks, or the four deuces. Examples of five of a kind would be four 10s and a wild card or two queens and three wild cards.

Straight Flush – This is the highest possible hand when only the standard pack is used, and there are no wild cards. A straight flush consists of five cards of the same suit in sequence, such as 10, 9, 8, 7, 6 of hearts. The highest-ranking straight flush is the A, K, Q, J, and 10 of one suit, and this combination has a special name: a royal flush or a royal straight flush. The odds on being dealt this hand are 1 in almost 650,000.

Four of a Kind – This is the next highest hand, and it ranks just below a straight flush. An example is four aces or four 3s. It does not matter what the fifth, unmatched card is.

Full House – This colorful hand is made up of three cards of one rank and two cards of another rank, such as three 8s and two 4s, or three aces and two 6s.

Flush – Five cards, all of the same suit, but not all in sequence, is a flush. An example is Q, 10, 7, 6, and 2 of clubs.

Straight – Five cards in sequence, but not all of the same suit is a straight. An example is 9?, 8?, 7?, 6?, 5?.

Three of a Kind – This combination contains three cards of the same rank, and the other two cards each of a different rank, such as three jacks, a seven, and a four.

Two Pairs – This hand contains a pair of one rank and another pair of a different rank, plus any fifth card of a different rank, such as Q, Q, 7, 7, 4.

One Pair – This frequent combination contains just one pair with the other three cards being of different rank. An example is 10, 10, K, 4, 3.

No Pair – This very common hand contains "nothing." None of the five cards pair up, nor are all five cards of the same suit or consecutive in rank. When more than one player has no pair, the hands are rated by the highest card each hand contains, so that an ace-high hand beats a king-high hand, and so on.

Two hands that are identical, card for card, are tied since the suits have no relative rank in Poker. In such a case, the tied players split the pot. Note that if two hands contain the same high pair, then the ranking of the next card in the hands determines which one wins. For example: 9, 9, 7, 4, 2 beats 9, 9, 5, 3, 2. Likewise, two hands that have identical pairs would be decided by the fifth card. For example: Q, Q, 6, 6, J beats Q, Q, 6, 6, 10.