文件名称:21littlegame
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.88kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
一个21点的游戏,游戏规则如下:
两个玩家,一个是人,一个是电脑。首先由电脑随机派两张牌给人类玩家(牌不能重复,牌的表示方式为 花色牌号,如红桃8),然后玩家通过自己判断再选择是否继续要牌。如果要,则继续随机派给玩家一张牌,若此时所有牌的点数之和大于21,则判断玩家为输,如果不是,则玩家可以继续选择要牌与否。如果不要牌,则人类玩家阶段结束。轮到电脑。电脑阶段与玩家阶段基本相同。电脑首先自己要两张牌,然后由电脑自己判断是否继续要牌,判断的最重要依据是刚好赢人类玩家就收手。而输赢是按照两家的点数与牌数,赢的一方是点数较大的一方,若点数相同,则取牌数量更多的一方胜,若牌数也一样,则不分胜负。
点数的计算方式为:不论花色(红桃,黑桃,梅花,方块),数字牌(2到10)按照数字算,A按照1来算, J,Q,K均算成0.5点。-A 21-point game, rules of the game are as follows:
Two players, one person, one is the computer. First, send two cards randomly by computer to human players (cards can not be repeated, the representation of color card brands, such as hearts 8), and then choose the players, through their own to determine whether to continue to license. If you want to, then continue to randomly assigned to the player a card, if all the cards at this time is greater than the sum of 21 points, then determine the player to lose, if not, then the player can continue to choose to license or not. If you do not card, then the end of the period of human players. Turn the computer. Phase and stage of the computer players basically the same. First, the computer must do their two cards, and then judge for themselves whether to continue by the computer to card, to judge based on the most important players just to win on the resumption of human hands. The winning or losing is based on two points with the license
两个玩家,一个是人,一个是电脑。首先由电脑随机派两张牌给人类玩家(牌不能重复,牌的表示方式为 花色牌号,如红桃8),然后玩家通过自己判断再选择是否继续要牌。如果要,则继续随机派给玩家一张牌,若此时所有牌的点数之和大于21,则判断玩家为输,如果不是,则玩家可以继续选择要牌与否。如果不要牌,则人类玩家阶段结束。轮到电脑。电脑阶段与玩家阶段基本相同。电脑首先自己要两张牌,然后由电脑自己判断是否继续要牌,判断的最重要依据是刚好赢人类玩家就收手。而输赢是按照两家的点数与牌数,赢的一方是点数较大的一方,若点数相同,则取牌数量更多的一方胜,若牌数也一样,则不分胜负。
点数的计算方式为:不论花色(红桃,黑桃,梅花,方块),数字牌(2到10)按照数字算,A按照1来算, J,Q,K均算成0.5点。-A 21-point game, rules of the game are as follows:
Two players, one person, one is the computer. First, send two cards randomly by computer to human players (cards can not be repeated, the representation of color card brands, such as hearts 8), and then choose the players, through their own to determine whether to continue to license. If you want to, then continue to randomly assigned to the player a card, if all the cards at this time is greater than the sum of 21 points, then determine the player to lose, if not, then the player can continue to choose to license or not. If you do not card, then the end of the period of human players. Turn the computer. Phase and stage of the computer players basically the same. First, the computer must do their two cards, and then judge for themselves whether to continue by the computer to card, to judge based on the most important players just to win on the resumption of human hands. The winning or losing is based on two points with the license
(系统自动生成,下载前可以参看下载内容)
下载文件列表
21littlegame.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.