联合开发网   搜索   要求与建议
                登陆    注册
排序按匹配   按投票   按下载次数   按上传日期
按分类查找All 数据结构(1) 
按平台查找All C#(1) 

[数据结构] card

计算每副牌的分值:每副牌有个原始大小(即排除对子,顺子,金花,顺金,筒子的大小),再 每张牌的分值为一个2位数,不足2位的补前导0,例如 A :14,‘10’:10,’2‘:’02‘,’k‘:13,’7‘:07 将3张牌按点数大小排序(从大到小),凑成一个6位数。例如’A27 :140702,‘829’:090802,‘JK8’:131108,‘2A10’:141002 例外,对于对子要将对子的位数放在前两位(后面会看到为什么这么做)。例如‘779’:070709,‘7A7’:070714,‘A33’:030314 现在的分值是一个6位数,将对子设为一个原始值加上10*100000的值,现在为一个7位数。例如‘779’:1070709,‘7A7’:1070714,‘A33’:1030314 对于顺子,将结果加上20*100000.。例如‘345’:2050403,‘QKA’:2141312,‘23A’:2140302 对于金花,将结果加上30*100000。例如‘Spade K,Spade 6,Spade J :3131106 因为顺金的时候其实是金花和顺子的和,所以顺金应该是50*10000。 例如‘Spade 7,Spade 6,Spade 8 :5080706 对于筒子,将结果加上60*100000。例如’666‘:6060606,’JJJ‘:6111111 3“ 比较两幅牌的大小(用所计算的分值来比较) 就这么简单!!
Scores calculated for each of the cards : Each of the cards have the original size ( ie excluding pairs, straights , Jinhua, Shun-Jin , cheese the size ) , and then         The score of each card a 2-digit , less than two s complement leading 0, for example A : 14, 10 : 10, 2 : 02 , k : 13, 7 : 07         The three cards in descending order according to points ( descending ) , make up a six digits. For example A27 : 140702, 829 : 090802, JK8 : 131108, 2 A10 : 141002         Exception to the pair on the first two pairs of digits ( you ll see later how to do so ) . For example 779 : 070709, 7 A7 : 070714, A33 : 030314       Now the score is a six-digit , it will set an original value plus the sub- 10* 100000 value , is now a seven digits. For example 779 : 1070709, 7 A7 : 1070714, A33 : 1030314       For the straight , the result plus 20* 100000 . For example 345 : 2050403, QK (2013-11-13, C#, 1KB, 下载5次)

http://www.pudn.com/Download/item/id/2398947.html
总计:1