This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//"A",2,3,4,5,6,7,8,9,10,11,12,13,"BLACK_JOKER","RED_JOKER" | |
function check(a,b){ | |
var lenght = a.length+b.length; | |
var checkList = [0,0,0,0];//把牌分成4类,1,2-5,6-13,14 | |
var sequence = [0,0,0,0,0,0,0,0,0,0,0,0];//抛开1,14 | |
var needList = [0,0,0,0];//需求 | |
change(a,checkList,sequence);//将a分类 | |
change(b,checkList,sequence);//将b分类 | |
for(var i=0;i<=14-lenght;i++){//根据牌的数量,开始计算并check需求量 | |
var r = _check(checkList.slice(),sequence.slice(i,lenght-1+i),needList.slice(),i); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
alert('this is a sample snipet. My First Github Gist Using.') | |
})(); |