var a = "8606454o056985060p072405880643074o0p2546098m4o0p4o0707074o0p06a74n078n471oc046434o4893084p090p0p9o1p45170p0n064p464o26260p446p46804p0p09060p0607560o06184848454646";
//var b= parseInt(a, 10);
G = function(a, b) {
var c = function(a) {
for (var b, c = [], d = 3, e = function(a) {
return a >= "0" && "9" >= a ? parseInt(a, 10) : a.charCodeAt(0) - "a".charCodeAt(0) + 10
}, f = function(a, b) {
var c, d, f, g, h;
//c =e 函数
return c = e(a[b]), d = e(a[b + 1]), d = 15 & d, f = (12 & c) >> 2, g = (2 & c) > 0, h = (1 & c) > 0, {
value: d, //d=e 函数
winner: f, // f = (12 & c)
playerPair: g, //g=(2&c)
bankerPair: h // h = (1 & c) > 0
}
},
g = 0; g < a.length - 1; g += 2)
b = f(a, g), b.winner !== d ? c.push(b) : c = [];
return c
};
if (!a || void 0 === b) return [];
switch (a) {
case "7bal":
case "bal":
return c(b);
case "rol":
case "rofl":
return b.split(";").map(function(a) {
return {
result: a
}
});
default:
return b
}
}
document.write(G("bal", a));
可以的联系我 Q 1069689491