-
1、对输入的要求
玩家手中可以有2-5张牌(玩家自己输入多少张牌)。牌点为2-10的每张牌都分别计为相应的点数。花牌(J,K,Q)都算10点。目标是尽可能...
1、对输入的要求
玩家手中可以有2-5张牌(玩家自己输入多少张牌)。牌点为2-10的每张牌都分别计为相应的点数。花牌(J,K,Q)都算10点。目标是尽可能接近21点,但不要超过21点。所以,任何超过21点的点数都表示这一手牌已经“爆”了。A既可以计为1点,也可以计为11点,要选择对玩家来说最有利的一个点数。例如,1张A和1张10可计为11点或21点,但由于21点更好,所以这一手牌要算成21点。1张A和2张8可计为17点或者27点,由于27点已经“爆”了,所以这一手牌要算成17点。
程序首先询问玩家手上有几张牌,玩家输入2,3,4或者5。然后询问玩家每张牌的点数。点数可为2-10,J,K,Q和A。2-9的值分别作为字符‘2’-‘9’来输入。10,J, Q, K和A等值分别作为字符‘t’,‘j’,‘q’,‘k’和‘a’来输入(当然,玩家不需要输入单引号);
2、对输出的要求:
可以让玩家更清楚的知道他下一步应该怎么做
3、程序所能达到的功能
能够计算出所有牌的点数 之和,而且能够帮你处理好那张牌对 你的牌点之和更有利。-Blackjack
- 2023-06-19 09:10:03下载
- 积分:1
-
Chinese Chess: The VC was very good .. can be man
中国象棋:用VC写的很不错的..可以人机对战,也可以2人对弈!可以悔棋,后退-Chinese Chess: The VC was very good .. can be man-machine war can also be 2 game! Can悔棋, retreat
- 2022-01-22 13:34:34下载
- 积分:1
-
五子棋程序,c语言描述,可以扩展,也可以直接使用
五子棋程序,c语言描述,可以扩展,也可以直接使用-Gobang procedures, c language description can be extended, can also be used directly
- 2023-08-25 18:50:02下载
- 积分:1
-
一个完美的色彩(便携式和# 39;游戏)
一个彩色的十全十美(文曲星里的游戏)-a perfect color (Portable"s game)
- 2022-05-31 07:45:47下载
- 积分:1
-
xo.rar three associations chesses play
xo.rar 一个三联棋游戏-xo.rar three associations chesses play
- 2022-03-10 20:11:04下载
- 积分:1
-
跳棋游戏源代码,VC制作,很简单,初学者容易看懂
跳棋游戏源代码,VC制作,很简单,初学者容易看懂-checkers game source code, VC production, a very simple, easy to understand beginners
- 2022-06-11 23:35:12下载
- 积分:1
-
Sieve dice games, can be used to test and other possible incident, the probabi...
骰筛子游戏,可用于检验"等可能事件"发生的概率相等-Sieve dice games, can be used to test and other possible incident, the probability of the same
- 2022-07-25 16:30:20下载
- 积分:1
-
Gobang the first edition, Qt4.0 written rules of function it is also useful
五子棋第一版,Qt4.0写的,规则函数值得参考-Gobang the first edition, Qt4.0 written rules of function it is also useful
- 2023-01-31 02:45:04下载
- 积分:1
-
using the latest algorithm, even if you are very serious, will inevitably be los...
采用最新算法,即使你很厉害,也不免会败给电脑。-using the latest algorithm, even if you are very serious, will inevitably be lost to the computer.
- 2023-07-17 03:50:02下载
- 积分:1
-
very good, there is a small place
非常好, 有一个小地方要加上判段, 就是 "双3" , 两排交错的双 3, 就应该可以结束了. 或一排已经有 4颗而两头又是空的,这时也可宣告胜方,而不是要下满5颗棋才宣告那方胜.
这个代码可当窗体画线画圆很好的示例代码,特加精品.-very good, there is a small place- to add, is the "double 3", two rows of staggered two-three, it should be ended. or have a row of four and two are empty, then can be declared the winner. and not under-five game before declaring it Sheng Fang. This code can be when Circle Line Form painting good example code, grossing- up products.
- 2022-03-07 19:04:54下载
- 积分:1