99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代寫COMP282、代做C++設(shè)計(jì)程序

時(shí)間:2024-05-11  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



1. Weighting:
50%
2. Overview
Create a basic GUI card game using C++ with Qt and organise the game structure using OOP
methods.
Royalty-free card images will be available for you to download from the COMP282 Canvas page for
you to use in the application if you choose. These will consist of 52 PNG images of standard playing
cards.
If you are not familiar with the standard 52 card deck of playing cards, Wikipedia goes into lots of
detail here: https://en.wikipedia.org/wiki/Standard_52-card_deck which you may find informative.
Our game is based loosely on the hands of the classic card game, Poker. We will define the rules of
the game as follows:
1. Objective: The objective of the game is to beat a computer opponent with combinations of 5
cards (known as a Hand) worth the highest value.
2. Card Value:
a. Cards have a value of 1 to 14 and a suit chosen from Hearts (♥), Diamonds (♦),
Spades (♠) and Clubs (♣). There are 52 cards in a Deck consisting of 13 cards in
each suit. There are no other cards (such as Jokers) needed in the game, and only one
deck is used.
b. Value ranges from 1 (low Ace) through the numbered cards worth 2 – 10 then 11
(Jack), 12 (Queen), 13 (King) and 14 (high Ace). Note that the Ace can be chosen to
be worth 1 or 14 as desired to match with other held cards, this is useful for straight
hands.
c. The value of cards is used to determine the winner when hands have the same rank
(more on ranks and categories later), e.g. both players have One Pair. If the value of
the rank cards are the same, the values of the remaining cards are used, e.g.:
Player has a pair of 10s, Computer has a pair of 7s, so Player wins.
Player has a hand of |10♠|10♥|2♣|3♣|5♦| and Computer has a hand of
|10♦|10♠|9♣|6♥|4♠|
In this case both players have One Pair of the same value (10). So we determine the
value of the remaining cards, which are 10 for Player (2+3+5) and 19 for Computer
(9+6+4), so Computer wins.
d. The suit is only used when determining a Flush (all cards the same suit).
e. No suit has a higher value than another. E.g. a Flush of hearts and a flush of clubs
with the same numerical cards are worth the same.
3. The rank and name of the combinations are as follows, with the highest values being
statistically less likely to occur and which automatically beats any card combination from a
lower category. E.g. any Straight Flush beats any Four-of-a-Kind:
Rank
(1=highest)
Category Example Hand Explanation
1 Straight
Flush
Flush and
Straight at the
same time.
2 Four Of A
Kind
Four cards
with the same
value – in this
example four
cards of value
5.
3 Full House Three of one
the same value
and two of
another.
4 Flush All cards are
the same suit –
in this example
all Diamonds.
The value and
order of the
cards does not
matter
5 Straight All cards are in
numerical
order, suit
doesn’t matter.
6 Three Of A
Kind
Three cards
with the same
value – in this
example
Queens.
7 Two Pair Two separate
matched pairs
of different
values, in the
example above
two Jacks and
two 3s
8 One Pair A single
matched pair
of the same
value, in the
example above
a pair of 10s.
9 Highest
Card
All cards are
different for
both players
and there is not
a straight or
flush
4. If both players have a Straight Flush the one with the highest card wins, otherwise it is a
draw.
5. If both players have Four-of-a-Kind the higher card wins, e.g. four 8s would beat four 5s. It
is not possible for both players to have the same 4 cards so the winner can always be found by
comparing these.
6. If both players have Full House the higher card of the group of three wins, e.g. three 4s and
two Queens would beat three 2s and two kings. It is not possible for both players to have three
cards of the same value so the winner can always be found by comparing these.
7. If both players have a Flush the highest card wins, in this example a Jack. If both players
have a flush and the same highest cards the next highest are compared, e.g. K, 10, 8, 7, 5
would beat K, 10, 8, 7, 3. If the cards are still same the same, e.g. both players have 10, 8, 5,
4 and 2 in different suits it’s a draw.
8. Examples of Straights are A-5, 2-6, 3-7, 4-8, 5-9, 6-10 (as example), 7-J, 8-Q, 9-K, 10-A.
Note that the Ace can be worth both 1 or 14 giving two possible straights that include it, e.g.
(A, 2, 3, 4, 5) or (10, J, Q, K, A). In all other situations the Ace is always worth 14. If both
players get a Straight the highest card of each wins, e.g. 9-Q would beat 3-7. If the high card
of both straight is the same, it’s a draw.
9. If both players have Three-of-a-Kind the higher card wins, e.g. three Jacks would beat three
8s. It is not possible for both players to have three cards of the same value so the winner can
always be found by comparing these.
10. If both players have Two Pair the highest pair wins, e.g. a pair of queens and a pair of 3s
beats a pair of 10s and a pair of 9s. If both pairs are the same for each player the highest fifth
card determines the winner, e.g. J, J, 8, 8, A beats J, J, 8, 8, 10 with deciding Ace being worth
14 not 1. A draw is possible.
11. If both players have One Pair the highest pair wins, e.g. a pair of 7s beats a pair of 2s. If the
pair is the same for each player the highest of the remaining three cards determines the
winner. A draw is possible.
12. The High Card result is determined by the highest card and continues until the last card. E.g.
Q, 8, 5, 4, 3 beats Q, 8, 5, 4, 2. A draw is possible.
5. Basic Gameplay (45 marks)
1. There should be a ‘start’ (or ‘deal’) button on the game window. When this button is clicked,
the game starts.
2. The cards are shuffled before each game.
3. For each Round, 10 cards taken from the shuffled Deck and distributed to the Player and the
Computer, making two hands with 5 cards each.
4. When a card has been used in a hand, it cannot be used again during that game (but bear in
mind the ‘advanced gameplay’ sections below).
5. Each game consists of rounds. When a new round is started but there are less than 10 cards
left in the deck, the game ends (since we cannot deal full hands to the players).
6. At the start of each round, the game window should display a representation of the player’s
hand (5 cards) and the computer’s hand (5 cards). This can be text-based, but you will get
marks for using images. Under each card, it should say the name of the card (e.g. ‘6 of
Spades’ or ‘6♠’).
7. The game should work out the categories (and therefore the rank) of each of the hands. Above
the cards, there should be a label that displays the category of the hand (e.g. ‘Full House’).
8. Based on those ranks, the game should determine who has the strongest hand. This should
also be displayed.
9. There should be a button marked ‘Next Round’ which will move the game on to the next
round. If there are no more rounds, the button should be marked ‘Finish Game’.
10. A score should be displayed and updated at the start of each round, that shows the player’s
score and the computer’s score. The scores represent the number of hands won in the game.
11. After the 5 rounds have been played, the winner should be announced (or a draw declared if
applicable), and the player should be able to play another game if they wish to.
6. Advanced gameplay (10 marks)
In rounds **4, allow the player to swap up to three cards from their hand with cards from the deck.
It’s up to you how to implement the interface for this (perhaps ‘Swap’ buttons, or perhaps by clicking
the card, or another method of your choosing). Don’t allow swapping in Round 5 (because in Round 5
there will be only 2 cards left in the deck). The cards that are swapped out of the player’s hand can
still remain in the game (i.e. they are replaced in the Deck at a random location).
7. Even more advanced gameplay (10 marks)
If the player swaps a card, the computer has the opportunity to swap a card from its deck too. The
computer will have to determine whether or not it is advantageous to swap a card (if the computer has
a Straight Flush hand, it won’t be worth swapping, for example, but if it has 1 pair it may want to
swap one of the other cards to attempt to improve the hand).
This can be as basic or complex as you like. A basic version may just scan a hand for groups of two,
three or four cards of the same value and swap any remaining cards to try to improve this. A more
advanced system may calculate the probabilities of getting a straight or flush hand.
6. Suggested Classes/Objects and Methods in the game
You are free to code the game as you like. But please ensure that you have classes called:
Game, Player, Card, Deck, Hand.
There are some suggested structures and methods below which you may find helpful.
Game class: Consists of two Players. Once the game has been completed the winner (or a draw) is
declared. Game state is shown in a game window as text and/or graphics of cards held with buttons
for triggering methods.
Player class: A class representing a player with a name and a score of hands won. Each Player
has a Hand of five Cards. Assume that both players can see each other’s cards and the result is
based purely on getting a strong hand of cards.
Card class: Has a value and a suit (e.g. 7 of Hearts).
Methods:
Card::getValue() returns the value as an integer, (e.g. 7). Aces are always worth 14 except
when used as start of a straight.
Card::getSuit() returns the suit name as a QString, e.g. “Clubs”, “Diamonds”, “Hearts” or
“Spades”.
Card::getName() returns the card name as a QString, e.g. “Jack of Clubs”, “Two of Hearts”.
Card::getNumber() returns the card type as an integer (see the section on Hand::setHand
method to see how the system works). E.g. 9 of Diamonds would return 209.
Deck class: Consists of a complete standard pack of 52 cards with one of each value 2-10 and Jack,
Queen, King and Ace in each suit (4 * 13 cards).
Methods:
Deck::createDeck() generates a complete pack correctly as stated above in any order. Each
card is a Card object.
Deck::shuffle() randomly puts the cards in a random order, e.g. before a game begins or after
the last card is dealt.
Deck::dealCard() returns the first card in deck and continues until the entire deck has been
dealt. When the last card has been dealt the entire deck is automatically shuffled so dealing can
continue indefinitely.
Hand class: Holds five cards for a player, with methods to replace and order cards within it. Each
player has one opportunity per round of the game (in rounds **4) to swap up to three cards to improve
their hand. After this, the winner (or a draw) is determined.
Hand::dealHand(Deck& deck): Creates a new hand of five cards from a deck, replacing any
existing cards in the hand.
Hand::sortValue(): Sorts cards in value order from smallest to largest.
E.g., a hand with cards 8, Q, 2, A, 2 would be sorted to 2, 2, 8, Q, A, considering A as 14 when not
part of a straight.
Hand::sortGroup() : sorts the cards in a hand based on the frequency of each card's value,
placing the most frequent values first. For example, a hand containing the cards 2, 7, 7, 2, 7 would be
rearranged to 7, 7, 7, 2, 2, grouping all 7s together followed by the 2s due to the higher frequency of
7s. If there are groups of equal size, such as two pairs or two triples, the groups are ordered by the
card value in ascending order. For instance, a hand with cards 6, King, 8, 6, King (where King
represents a higher value, typically 13) would be sorted to 6, 6, King, King, 8. This is because both
pairs (6s and Kings) have the same frequency, and 6 is numerically smaller than King. In cases where
no multiples are present, meaning all cards have unique values, the method defaults to sorting by
individual card values in ascending order. This functionality is achieved by calling the
`sortValue()` method, which organises cards from lowest to highest value.
Hand::getBest(): Calculates the highest value in the hand as shown above and returns, from
highest to lowest value, a four-character QString: "stfl", "four", "full", "flsh", "strt", "trio", "twop",
"pair", "high".
Hand::setHand(const QVector<int>& cardValues):
Sets a hand to specific cards defined in a five-element integer QVector.
The first digit (s) of each integer is the suit in alphabetical order:
1 = club, 2 = diamond, 3 = heart, 4 = spade.
The next two digits (vv) are the value of the card:
01 = Ace, 02-10 = number card, 11 = Jack, 12 = Queen, 13 = King.
These values define Card objects representing the correct card which then replaces the existing hand.
Example:
請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp



 

掃一掃在手機(jī)打開當(dāng)前頁
  • 上一篇:代寫MATH4063、c++,Python程序設(shè)計(jì)代做
  • 下一篇:CPT204代寫、代做Java設(shè)計(jì)程序
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    出評(píng) 開團(tuán)工具
    出評(píng) 開團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
    合肥機(jī)場(chǎng)巴士2號(hào)線
    合肥機(jī)場(chǎng)巴士2號(hào)線
    合肥機(jī)場(chǎng)巴士1號(hào)線
    合肥機(jī)場(chǎng)巴士1號(hào)線
  • 短信驗(yàn)證碼 豆包 幣安下載 AI生圖 目錄網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                成人黄色软件下载| 日韩一级黄色片| 日韩久久免费av| 久久精品国产精品亚洲红杏| 日韩一级免费观看| 青娱乐精品视频在线| 日韩欧美成人一区二区| 国产一区二区三区四区五区美女 | 日韩欧美的一区二区| 免费观看成人av| 国产视频一区二区在线| 91影视在线播放| 亚洲成人动漫在线观看| 精品久久久久久久久久久久久久久 | 九一九一国产精品| 久久久五月婷婷| 91成人免费电影| 麻豆精品视频在线观看| 国产精品女主播在线观看| 欧美日韩免费一区二区三区视频| 美女在线一区二区| 亚洲欧美日韩国产成人精品影院| 欧美精品免费视频| 成人国产在线观看| 麻豆精品视频在线| 一区二区三区四区乱视频| 亚洲精品一区二区三区四区高清| 99精品视频在线免费观看| 免费看日韩a级影片| 国产精品久久网站| 精品久久久久久久久久久久久久久 | 色视频一区二区| 另类小说综合欧美亚洲| 一区二区三区小说| 欧美国产日本韩| 欧美成人vps| 91麻豆精品国产自产在线观看一区 | 精品在线亚洲视频| 午夜精品爽啪视频| 亚洲精品国产a久久久久久| 久久久激情视频| 日韩欧美高清dvd碟片| 欧美日韩一二区| 色综合久久综合| av中文一区二区三区| 国产高清亚洲一区| 国产乱码精品一区二区三| 麻豆91免费观看| 亚洲午夜电影网| 久久久久综合网| 欧美变态tickle挠乳网站| 欧美一级午夜免费电影| 欧美天堂亚洲电影院在线播放| 成人av在线播放网站| 国产a区久久久| 国产不卡在线一区| 不卡视频在线观看| 99久久综合99久久综合网站| 成人小视频在线| 成人动漫中文字幕| 9人人澡人人爽人人精品| 99国产欧美另类久久久精品| www.综合网.com| 91蜜桃在线免费视频| 欧美性猛片aaaaaaa做受| 欧美日韩国产在线观看| 欧美精品日韩一本| 欧美成va人片在线观看| 国产精品嫩草影院com| 国产精品麻豆网站| 亚洲男同1069视频| 亚洲v日本v欧美v久久精品| 免费观看日韩电影| 粉嫩绯色av一区二区在线观看| 福利视频网站一区二区三区| 一本大道av一区二区在线播放| 在线视频国内一区二区| 91精品国产黑色紧身裤美女| 精品福利一二区| 国产精品女上位| 亚洲一区二区三区在线| 麻豆精品视频在线| 成人精品一区二区三区四区 | 中文字幕精品一区| 亚洲免费三区一区二区| 午夜精品久久久久久久99水蜜桃| 天天色天天爱天天射综合| 国产一区二区在线免费观看| 99久久夜色精品国产网站| 91久久免费观看| 久久综合久色欧美综合狠狠| 亚洲精品免费看| 蜜臀久久99精品久久久画质超高清| 麻豆精品在线看| 欧美伊人久久大香线蕉综合69 | 欧美一区二区三区播放老司机| 欧美大肚乱孕交hd孕妇| 亚洲丝袜制服诱惑| 国产一区二区三区av电影| 884aa四虎影成人精品一区| 国产精品久久久久久亚洲毛片| 丝袜亚洲另类欧美综合| 在线免费观看日韩欧美| 亚洲国产高清aⅴ视频| 九九久久精品视频| 在线综合视频播放| 亚洲国产精品一区二区www在线| 国产成人综合自拍| 2020国产精品| 狠狠色狠狠色综合系列| 欧美丰满嫩嫩电影| 亚洲综合久久久久| 色av综合在线| 亚洲日穴在线视频| 91在线小视频| 国产欧美精品国产国产专区| 国产在线精品国自产拍免费| 欧美一级高清片| 美女在线视频一区| 日韩视频中午一区| 美女视频黄频大全不卡视频在线播放| 欧美日韩一区二区在线观看| 一区二区高清免费观看影视大全 | 国产91丝袜在线18| 欧美国产精品一区二区三区| 国内外成人在线| 欧美成人艳星乳罩| 另类小说图片综合网| 亚洲精品一区在线观看| 国产自产2019最新不卡| xfplay精品久久| 国产激情一区二区三区| 国产三级精品三级| 成人黄色国产精品网站大全在线免费观看| 久久综合av免费| 国产·精品毛片| 最新不卡av在线| 在线中文字幕一区| 亚洲成人精品影院| 91精品婷婷国产综合久久竹菊| 欧美bbbbb| 国产精品国产精品国产专区不片| av亚洲精华国产精华精| 亚洲国产精品麻豆| 欧美mv日韩mv国产网站| 波多野结衣中文一区| 亚洲中国最大av网站| 日韩欧美色电影| 成人av动漫网站| 香蕉久久夜色精品国产使用方法| 6080国产精品一区二区| 国产aⅴ精品一区二区三区色成熟| 国产精品美女久久久久av爽李琼| 日本精品视频一区二区三区| 亚洲一二三区在线观看| 日韩小视频在线观看专区| 国产成人高清在线| 亚洲va国产天堂va久久en| 久久综合久久久久88| 欧美优质美女网站| 国产在线精品免费| 午夜伦欧美伦电影理论片| 久久精品亚洲麻豆av一区二区 | 色吊一区二区三区| 国产一区二区三区美女| 亚洲专区一二三| 欧美国产日韩亚洲一区| 欧美老肥妇做.爰bbww| 高清国产午夜精品久久久久久| 午夜久久久久久久久| 国产精品久久久久毛片软件| 777xxx欧美| 一本大道久久a久久精品综合| 久久精品国内一区二区三区| 亚洲一区国产视频| 亚洲欧洲性图库| 精品乱人伦一区二区三区| 欧美色图天堂网| av激情综合网| 国产电影一区在线| 国产一区二区免费在线| 视频一区中文字幕国产| 亚洲精品综合在线| 亚洲国产成人自拍| 久久精品一区二区| 久久亚洲私人国产精品va媚药| 51久久夜色精品国产麻豆| 欧美一a一片一级一片| 91在线高清观看| 91一区二区三区在线播放| 成人精品小蝌蚪| 成人午夜私人影院| 国产69精品久久777的优势| 国产精品亚洲专一区二区三区| 国内精品伊人久久久久av一坑| 美腿丝袜在线亚洲一区| 日本美女视频一区二区| 婷婷中文字幕综合| 亚洲精品视频在线观看免费 | 青娱乐精品视频在线|