文件名称:21points

  • 所属分类:
  • 棋牌游戏
  • 资源属性:
  • [C/C++] [源码]
  • 上传时间:
  • 2012-11-26
  • 文件大小:
  • 2kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • fan***
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

一个21点的游戏,游戏规则如下:

两个玩家,一个是人,一个是电脑。首先由电脑随机派两张牌给人类玩家(牌不能重复,牌的表示方式为 花色牌号,如红桃8),然后玩家通过自己判断再选择是否继续要牌。如果要,则继续随机派给玩家一张牌,若此时所有牌的点数之和大于21,则判断玩家为输,如果不是,则玩家可以继续选择要牌与否。如果不要牌,则人类玩家阶段结束。轮到电脑。电脑阶段与玩家阶段基本相同。电脑首先自己要两张牌,然后由电脑自己判断是否继续要牌,判断的最重要依据是刚好赢人类玩家就收手。而输赢是按照两家的点数与牌数,赢的一方是点数较大的一方,若点数相同,则取牌数量更多的一方胜,若牌数也一样,则不分胜负。

点数的计算方式为:不论花色(红桃,黑桃,梅花,方块),数字牌(2到10)按照数字算,A按照1来算, J,Q,K均算成0.5点。

-A 21-point game, the rules of the game are as follows:

The two players, one is a computer. First send two cards randomly by the computer to the human player (card can not be repeated representation of the brand color grades, such as hearts 8), then the players through their own judgment and then decide whether to continue to draw cards. If you want to continue randomly assigned to the player a card, if the number of points of all the cards and greater than 21, then to judge the players to lose, if not, the player can continue to select the card or not. If you do not want a license, the human player the end of phase. Turn to the computer. The computer is basically the same stage with the players stage. Computer first two cards, then the computer s own judgment whether to continue to draw cards, the most important basis for judgment is just to win a human player close hand. Winning or losing is in accordance with the two points with a license number, win points larger if the points are
(系统自动生成,下载前可以参看下载内容)

下载文件列表

21points.cpp

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org