文件名称:homework_2
介绍说明--下载内容均来自于网络,请自行研究使用
两个玩家,一个是人,一个是电脑。首先由电脑随机派两张牌给人类玩家(牌不能重
复,牌的表示方式为 花色牌号,如红桃 8),然后玩家通过自己判断再选择是否继续
要牌。如果要,则继续随机派给玩家一张牌,若此时所有牌的点数之和大于 21,则判
断玩家为输,如果不是,则玩家可以继续选择要牌与否。如果不要牌,则人类玩家阶
段结束。轮到电脑。电脑阶段与玩家阶段基本相同。电脑首先自己要两张牌,然后由
电脑自己判断是否继续要牌,判断的最重要依据是刚好赢人类玩家就收手。而输赢是
按照两家的点数与牌数,赢的一方是点数较大的一方,若点数相同,则取牌数量更多
的一方胜,若牌数也一样,则不分胜负。-Design a 21-point game, rules of the game are as follows: two players, one person, one computer. First, the computer randomly send two cards to human players (cards not re-
Complex representation, licensing of color grades, such as hearts 8), then the players through their own judgment and then choose whether to continue
To license. If you want, then randomly assigned to continue the player a card, if all the cards at this point is greater than 21, the penalty
Off players to lose, and if not, then the player can continue to choose to license or not. If you do not license, then the order of human players
The end of the segment. Turn the computer. PC gamers stage with the same phase. Computer first two cards they want, and then the
Computer to determine whether to continue to license its own, the most important basis of human judgment is just to win the player to stop. The winners and losers are
In accordance with the number of points the two cards, the winning party is a part
复,牌的表示方式为 花色牌号,如红桃 8),然后玩家通过自己判断再选择是否继续
要牌。如果要,则继续随机派给玩家一张牌,若此时所有牌的点数之和大于 21,则判
断玩家为输,如果不是,则玩家可以继续选择要牌与否。如果不要牌,则人类玩家阶
段结束。轮到电脑。电脑阶段与玩家阶段基本相同。电脑首先自己要两张牌,然后由
电脑自己判断是否继续要牌,判断的最重要依据是刚好赢人类玩家就收手。而输赢是
按照两家的点数与牌数,赢的一方是点数较大的一方,若点数相同,则取牌数量更多
的一方胜,若牌数也一样,则不分胜负。-Design a 21-point game, rules of the game are as follows: two players, one person, one computer. First, the computer randomly send two cards to human players (cards not re-
Complex representation, licensing of color grades, such as hearts 8), then the players through their own judgment and then choose whether to continue
To license. If you want, then randomly assigned to continue the player a card, if all the cards at this point is greater than 21, the penalty
Off players to lose, and if not, then the player can continue to choose to license or not. If you do not license, then the order of human players
The end of the segment. Turn the computer. PC gamers stage with the same phase. Computer first two cards they want, and then the
Computer to determine whether to continue to license its own, the most important basis of human judgment is just to win the player to stop. The winners and losers are
In accordance with the number of points the two cards, the winning party is a part
(系统自动生成,下载前可以参看下载内容)
下载文件列表
homework_2\bin\Debug\homework_2.exe
..........\homework_2.cbp
..........\homework_2.layout
..........\main.cpp
..........\obj\Debug\main.o
..........\bin\Debug
..........\obj\Debug
..........\bin
..........\obj
homework_2