文件名称:hm3
介绍说明--下载内容均来自于网络,请自行研究使用
实现扑克牌的洗牌算法。
将52张牌(不包括大、小王)按东、南、西、北分发。
每张牌用一个对象代表,包括:牌的类型、大小序号、名称。
例如:黑头A的牌型为S,序号为13(在K之后),名称为A。
比较牌大小时按序号比较大小(2的序号最小、A最大)
显示牌时将按牌型、名称显示。
例如:东家最后牌为: S:1,4,12
H:7,9
D:2,4,8,10
C:4,5,12,13
注: 洗牌次数可用随机数来确定, Math.random()的结果是0~1之间的一个随机数 -realization of cards shuffling algorithm. Licensing of 52 (not including, Wang) on the East, South, West, North circulated. Each card with a targeted representatives, including : the type of card, the size of the serial number, name. For example : A calibrated to the license for S-type, serial number 13 (after K), known as A. Comparing the size of a license by the relatively small number (serial number 2 of the smallest and the largest A) signs will be at the licensing type, name revealed. For example : licensed as a club final : S : 1,4,12,24 H : 7,9 D : 2,4,8,10 C : C10, 13 Note : shuffling number of available random number to determine, Math.random () is the result of a 0 ~ between a Random Number
将52张牌(不包括大、小王)按东、南、西、北分发。
每张牌用一个对象代表,包括:牌的类型、大小序号、名称。
例如:黑头A的牌型为S,序号为13(在K之后),名称为A。
比较牌大小时按序号比较大小(2的序号最小、A最大)
显示牌时将按牌型、名称显示。
例如:东家最后牌为: S:1,4,12
H:7,9
D:2,4,8,10
C:4,5,12,13
注: 洗牌次数可用随机数来确定, Math.random()的结果是0~1之间的一个随机数 -realization of cards shuffling algorithm. Licensing of 52 (not including, Wang) on the East, South, West, North circulated. Each card with a targeted representatives, including : the type of card, the size of the serial number, name. For example : A calibrated to the license for S-type, serial number 13 (after K), known as A. Comparing the size of a license by the relatively small number (serial number 2 of the smallest and the largest A) signs will be at the licensing type, name revealed. For example : licensed as a club final : S : 1,4,12,24 H : 7,9 D : 2,4,8,10 C : C10, 13 Note : shuffling number of available random number to determine, Math.random () is the result of a 0 ~ between a Random Number
(系统自动生成,下载前可以参看下载内容)
下载文件列表
编写一个程序实现扑克牌的洗牌算法。.txt