国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

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

代寫COMP 282、代做C++編程設(shè)計(jì)
代寫COMP 282、代做C++編程設(shè)計(jì)

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



1. Deadline: 
Tuesday 14th May 2024 
(Feedback to be released on 4
the June 2024) 
2. Weighting: 
50% 
3. 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. 
 
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. 
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: 
Hand::setHand({111, 311, 411, 201, 308}) 
defines the hand: Jack of Clubs, Jack of Hearts, Jack of Spades, Ace of Diamonds, Eight of Hearts. 
For Advanced Gameplay tasks: 
Hand::swapCard(const QVector<int>& cardIndices, Deck& deck): Replaces up to 
three specified cards with the next card in the deck. 
 
Examples: 
myHand.swapCard({1, 3}, myDeck); 
replaces the first and third cards in deck ‘myDeck’. 
myHand.swapCard({3, 4, 5}, myDeck); 
replaces the third, fourth, and fifth cards in deck ‘myDeck’. 
myHand.swapCard({1, 3, 1}, myDeck); 
replaces the first and third cards and ignores the duplication of the first card. 
myHand.swapCard({1, 3, 4, 5}, myDeck); 
replaces cards 1, 3, and 4; the fourth value is ignored. 
myHand.swapCard({}, myDeck); 
does nothing. 
Order does not matter, e.g., myHand.swapCard({3, 4, 5}, myDeck); 
is the same as myHand.swapCard({5, 3, 4}, myDeck); 
 
請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp















 

掃一掃在手機(jī)打開當(dāng)前頁
  • 上一篇:去越南探親如何辦什么簽證(越南探親簽證長什么樣)
  • 下一篇:代寫EBU4201、代做Java設(shè)計(jì)編程
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲勞振動
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)40個(gè)行業(yè)
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)4
    超全面的拼多多電商運(yùn)營技巧,多多開團(tuán)助手,多多出評軟件徽y1698861
    超全面的拼多多電商運(yùn)營技巧,多多開團(tuán)助手
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服務(wù)平臺
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗(yàn)證碼 豆包網(wǎng)頁版入口 破天一劍 目錄網(wǎng) 排行網(wǎng)

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产成人亚洲综合91| 国产成人一区二区在线| 97免费中文视频在线观看| www.国产一区| 无码人妻精品一区二区蜜桃网站 | 欧美精品一区三区在线观看| 99国产在线| 久久91精品国产| 国内精品久久国产| 久久天天躁狠狠躁夜夜av| 天堂av一区二区| 91九色精品视频| 综合久久国产| 国产亚洲天堂网| 国产精品免费一区| 欧美日韩在线不卡视频| 久久久久久久久久久久久久久久av| 亚洲精品中字| 91国语精品自产拍在线观看性色| 欧美精品福利在线| 蜜桃网站成人| 国产精品久久久久久久久粉嫩av | 国产精品视频播放| 欧美日韩免费高清| 久久精品99无色码中文字幕| 日本不卡视频在线播放| 国产成人一区二区三区电影 | 欧美亚洲色图视频| 色偷偷av亚洲男人的天堂| 肉大捧一出免费观看网站在线播放| 国产日韩在线看片| 久色乳综合思思在线视频| 国语自产精品视频在免费| 国产精品网红福利| 国内精品久久国产| 精品国产免费一区二区三区| 国产精选久久久久久| 一区二区三区四区视频在线观看| 国产精品亚洲激情| 午夜精品短视频| 久久久噜噜噜www成人网| 欧美性视频网站| 不卡伊人av在线播放| 国产伦精品一区二区三区高清| 中文一区一区三区免费| 成人av资源网| 日本精品视频一区| 国产精品视频26uuu| 国产一区二区黄色| 亚洲视频在线二区| 日日摸夜夜添一区| 国产偷人视频免费| 一本大道熟女人妻中文字幕在线| 成人国产精品一区| 亚洲第一页在线视频| 国产欧美一区二区白浆黑人 | 色999五月色| 久久精品综合一区| 日韩在线三区| 久久久最新网址| 日韩av大片免费看| 久久96国产精品久久99软件| 黄色一级在线视频| 精品国产免费av| 97久久天天综合色天天综合色hd| 亚洲第一精品区| 日日骚久久av| 国产三级精品在线不卡| 一区二区三区精品国产| 久久免费高清视频| 欧美在线一区二区三区四| 久久精品国产视频| 国产噜噜噜噜久久久久久久久 | 日本精品一区二区三区在线播放视频| 日韩中文有码在线视频| 精品日产一区2区三区黄免费 | 久久久久久久久久久久久国产 | 91久久精品国产| 亚洲a级在线播放观看| 九九九热999| 国产一区红桃视频| 亚洲欧美日韩精品综合在线观看| 久久久久久久久久久免费精品| 精品人妻少妇一区二区| 宅男噜噜99国产精品观看免费| 国产成人精品免费视频| 国内精品视频一区二区三区| 欧美日韩福利视频| 国产成人一区三区| 免费av网址在线| 亚洲成人午夜在线| 国产精品免费一区二区三区四区| 波多野结衣成人在线| 视频一区二区三区在线观看| 久久精品国产亚洲| 草莓视频一区| 精品无码一区二区三区爱欲 | 国产伦精品一区二区三区高清| 日韩专区第三页| 欧美成人精品一区二区三区| 久久久亚洲国产精品| 欧美黄色免费影院| 美女福利视频一区| 91九色国产ts另类人妖| 欧洲精品国产| 亚洲欧美日韩在线综合| 国产精品天天狠天天看| 91高潮在线观看| 国产一二三四区在线观看| 日本欧美中文字幕| 一区二区三区在线观看www| 久久精品成人欧美大片| 97色在线播放视频| 精品一区二区视频| 秋霞无码一区二区| 亚洲国产精品www| www.欧美精品| 久久久久久久久久久久久久久久久久av | 国产麻豆一区二区三区在线观看| 欧美一级在线播放| 一区二区在线高清视频| 精品国产一区二区三区久久狼黑人| 久久综合给合久久狠狠色 | 91精品久久久久| 免费看国产一级片| 男人的天堂狠狠干| 日韩精品一区二区在线视频| 中文字幕一区二区三区在线乱码| 久久精品免费电影| 久久国产主播精品| 国产精品91在线| 99久久久久国产精品免费| 国产日本欧美在线| 国产这里只有精品| 欧美高清一区二区| 青青影院一区二区三区四区| 日韩av高清| 亚洲日本精品一区| 色哺乳xxxxhd奶水米仓惠香| 亚洲精品第一区二区三区| 制服诱惑一区| 自拍视频一区二区三区| 国产精品美女主播| 国产精品日韩在线观看| xvideos亚洲| 日韩专区中文字幕| 国产成人无码a区在线观看视频| 国产成人一区二区三区| 国产激情999| 久久伦理网站| 国产xxxx振车| 久久久这里只有精品视频| 91av免费看| 久久久综合亚洲91久久98| 77777亚洲午夜久久多人| av免费观看网| 91精品久久久久久久久中文字幕| 国产裸体写真av一区二区| 麻豆传媒一区二区| 国产主播在线看| 国产欧美日韩精品专区| 国产精品一区二区三区在线播放| 国产欧美韩国高清| 操人视频欧美| 91久久嫩草影院一区二区| 久久久久久精| 国产精品狼人色视频一区| 国产精品传媒毛片三区| 精品国产第一页| 亚洲熟妇无码另类久久久| 岛国一区二区三区高清视频| 日韩极品视频在线观看| 日本精品二区| 欧美日韩一区二区视频在线 | 国产在线欧美日韩| 91免费版网站入口| 久久精品一二三区| 久久久精品国产| 久久国产精彩视频| 亚洲色欲综合一区二区三区 | 国产精品69久久| 色老头一区二区三区| 国产精品极品尤物在线观看| 国产精品二区在线| 自拍日韩亚洲一区在线| 欧美一级免费视频| 欧美,日韩,国产在线| 国产伦精品一区二区三区高清 | 国产女人精品视频| 国产精品aaa| 国产精品久久久久久久7电影| 亚洲一卡二卡三卡| 欧洲久久久久久| 蜜桃91精品入口| www.九色.com| 国产成人精品一区| 久久91精品国产91久久跳| 亚洲a中文字幕| 精品欧美一区二区三区久久久 | 曰韩不卡视频|