643 lines
30 KiB
JavaScript
643 lines
30 KiB
JavaScript
$(function(){
|
|
down_bet = {};
|
|
var $betchip=$(".play .bet-box ul li"),
|
|
$betbox=$(".play .brand-table .bet_box");
|
|
|
|
var money =0,alldown=0;
|
|
|
|
$betchip.click(function(){
|
|
var chip=$(this).attr("data-jeton")
|
|
$(this).addClass("on").siblings("li").removeClass("on");
|
|
$("#chip").val(chip);
|
|
})
|
|
|
|
$betbox.click(function(){
|
|
var bet= $(this).attr("data-bet"),
|
|
lastbet=$.data(down_bet,bet)||0,
|
|
chip=$("#chip").val();
|
|
|
|
money=parseInt(chip)+lastbet;
|
|
alldown+=parseInt(chip)||0;
|
|
|
|
if(bet=="playerpair"){
|
|
$.data(down_bet, {"playerpair": money});
|
|
$("#"+bet).text($.data(down_bet,bet)||0);
|
|
}else if(bet=="player"){
|
|
$.data(down_bet, {"player": money});
|
|
$("#"+bet).text($.data(down_bet,bet)||0);
|
|
|
|
}else if(bet=="tie"){
|
|
$.data(down_bet, {"tie": money});
|
|
$("#"+bet).text($.data(down_bet,bet)||0);
|
|
|
|
}else if(bet=="banker"){
|
|
$.data(down_bet, {"banker": money});
|
|
$("#"+bet).text($.data(down_bet,bet)||0);
|
|
|
|
}else if(bet=="bankerpair"){
|
|
$.data(down_bet, {"bankerpair": money});
|
|
$("#"+bet).text($.data(down_bet,bet)||0);
|
|
}
|
|
$("#alldown").text(alldown);
|
|
|
|
chip_show(bet);
|
|
})
|
|
})
|
|
|
|
|
|
|
|
function chip_show(dwon_bet){
|
|
var Thisclass="."+dwon_bet,
|
|
thisbet=$.data(down_bet,dwon_bet);
|
|
// console.log(thisbet)
|
|
switch(true){
|
|
// 百
|
|
case thisbet<100:
|
|
$(Thisclass).children("i").remove();
|
|
var s=thisbet/10;
|
|
if(s<5){
|
|
for(var i=0;i<s;i++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*i+'px"></i>');
|
|
}
|
|
}else if(s==5){
|
|
$(Thisclass).append('<i class="chip50"></i>');
|
|
}else if(s>5){
|
|
$(Thisclass).append('<i class="chip50"></i>');
|
|
for(var i=0;i<s-5;i++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(i+1)+'px"></i>');
|
|
}
|
|
}
|
|
break;
|
|
// 千
|
|
case thisbet<1000:
|
|
$(Thisclass).children("i").remove();
|
|
var b=parseInt(thisbet/100),
|
|
s=(thisbet-b*100)/10;
|
|
if(b<5){
|
|
for(var i=0;i<b;i++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*i+'px"></i>');
|
|
}
|
|
switch(true){
|
|
case s<5:
|
|
for(var i=0;i<s;i++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(i+b)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*b+'px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*b+'px"></i>');
|
|
for(var i=0;i<s-5;i++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(i+b+1)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}else if(b==5){
|
|
$(Thisclass).append('<i class="chip500"></i>');
|
|
switch(true){
|
|
case s<5:
|
|
for(var i=0;i<s;i++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(i+1)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-5px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-5px"></i>');
|
|
for(var i=0;i<s-5;i++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(i+2)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}else if(b>5){
|
|
$(Thisclass).append('<i class="chip500" style="margin-top:5px"></i>');
|
|
for(var e=0;e<b-5;e++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*e+'px"></i>');
|
|
}
|
|
switch(true){
|
|
case s<5:
|
|
for(var i=0;i<s;i++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(i+e)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*e+'px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*e+'px"></i>');
|
|
for(var i=0;i<s-5;i++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(i+e+1)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
|
|
}
|
|
break;
|
|
// 万
|
|
case thisbet<10000:
|
|
$(Thisclass).children("i").remove();
|
|
var k=parseInt(thisbet/1000),
|
|
b=parseInt((thisbet-1000*k)/100),
|
|
s=(thisbet-1000*k-b*100)/10;
|
|
if(k<5){
|
|
for(var e=0;e<k;e++){
|
|
$(Thisclass).append('<i class="chip1k" style="margin-top:-'+5*e+'px"></i>');
|
|
}
|
|
if(b==0){
|
|
switch(true){
|
|
case s<5:
|
|
for(var a=0;a<s;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+k)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(k)+'px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(k)+'px"></i>');
|
|
for(var a=0;a<s-5;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+k+1)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}else if(b<5){
|
|
for(var i=0;i<b;i++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*(i+k)+'px"></i>');
|
|
switch(true){
|
|
case s<5:
|
|
for(var a=0;a<s;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+k)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+k)+'px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+k)+'px"></i>');
|
|
for(var a=0;a<s-5;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+k+1)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}else if(b==5){
|
|
$(Thisclass).append('<i class="chip500" style="margin-top:-'+5*k+'px"></i>');
|
|
switch(true){
|
|
case s<5:
|
|
for(var a=0;a<s;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+k-4)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+k-4)+'px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+k-4)+'px"></i>');
|
|
for(var a=0;a<s-5;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+k-3)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}else if(b>5){
|
|
$(Thisclass).append('<i class="chip500" style="margin-top:-'+5*k+'px"></i>');
|
|
for(var i=0;i<b-5;i++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*(i+k+1)+'px"></i>');
|
|
}
|
|
switch(true){
|
|
case s<5:
|
|
for(var a=0;a<s;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+k-4)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+k-4)+'px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+k-4)+'px"></i>');
|
|
for(var a=0;a<s-5;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+k-3)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}else if(k==5){
|
|
$(Thisclass).append('<i class="chip5k"></i>');
|
|
if(b==0){
|
|
switch(true){
|
|
case s<5:
|
|
for(var a=0;a<s;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+1)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-5px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-5px"></i>');
|
|
for(var a=0;a<s-5;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+2)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}else if(b<5){
|
|
for(var i=0;i<b;i++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*(i+1)+'px"></i>');
|
|
switch(true){
|
|
case s<5:
|
|
for(var a=0;a<s;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+1)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+1)+'px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+1)+'px"></i>');
|
|
for(var a=0;a<s-5;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+2)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}else if(b==5){
|
|
$(Thisclass).append('<i class="chip500" style="margin-top:-5px"></i>');
|
|
switch(true){
|
|
case s<5:
|
|
for(var a=0;a<s;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b-3)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b-3)+'px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b-3)+'px"></i>');
|
|
for(var a=0;a<s-5;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b-2)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}else if(b>5){
|
|
$(Thisclass).append('<i class="chip500" style="margin-top:-5px"></i>');
|
|
for(var i=0;i<b-5;i++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*(i+2)+'px"></i>');
|
|
}
|
|
switch(true){
|
|
case s<5:
|
|
for(var a=0;a<s;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b-3)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b-3)+'px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b-3)+'px"></i>');
|
|
for(var a=0;a<s-5;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b-2)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
}else if(k>5){
|
|
$(Thisclass).append('<i class="chip5k"></i>');
|
|
for(var e=0;e<k-5;e++){
|
|
$(Thisclass).append('<i class="chip1k" style="margin-top:-'+5*(e+1)+'px"></i>');
|
|
}
|
|
if(b==0){
|
|
switch(true){
|
|
case s<5:
|
|
for(var a=0;a<s;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+k-4)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(k-4)+'px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(k-4)+'px"></i>');
|
|
for(var a=0;a<s-5;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+k-3)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}else if(b<5){
|
|
for(var i=0;i<b;i++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*(i+k-4)+'px"></i>');
|
|
switch(true){
|
|
case s<5:
|
|
for(var a=0;a<s;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+k-4)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+k-4)+'px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+k-4)+'px"></i>');
|
|
for(var a=0;a<s-5;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+k-3)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}else if(b==5){
|
|
$(Thisclass).append('<i class="chip500" style="margin-top:-'+5*(k-4)+'px"></i>');
|
|
switch(true){
|
|
case s<5:
|
|
for(var a=0;a<s;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+k-8)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+k-8)+'px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+k-8)+'px"></i>');
|
|
for(var a=0;a<s-5;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+k-7)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}else if(b>5){
|
|
$(Thisclass).append('<i class="chip500" style="margin-top:-'+5*(k-4)+'px"></i>');
|
|
for(var i=0;i<b-5;i++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*(i+k-3)+'px"></i>');
|
|
}
|
|
switch(true){
|
|
case s<5:
|
|
for(var a=0;a<s;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+k-8)+'px"></i>');
|
|
}
|
|
break;
|
|
case s==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+k-8)+'px"></i>');
|
|
break;
|
|
case s>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(b+k-8)+'px"></i>');
|
|
for(var a=0;a<s-5;a++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(a+b+k-7)+'px"></i>');
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
// 十万
|
|
// 最后判断
|
|
case thisbet<=100000:
|
|
$(Thisclass).children("i").remove();
|
|
var w=parseInt(thisbet/10000)
|
|
var k=parseInt((thisbet-10000*w)/1000)
|
|
var b=parseInt((thisbet-10000*w-k*1000)/100)
|
|
var s=(thisbet-10000*w-1000*k-100*b)/10
|
|
|
|
// console.log(k)
|
|
|
|
for(var c=0;c<w;c++){
|
|
$(Thisclass).append('<i class="chip1w" style="margin-top:-'+5*c+'px"></i>')
|
|
}
|
|
switch(true){
|
|
case k<5:
|
|
for(var g=0;g<k;g++){
|
|
$(Thisclass).append('<i class="chip1k" style="margin-top:-'+5*(g+w)+'px"></i>')
|
|
}
|
|
break;
|
|
case k==5:
|
|
$(Thisclass).append('<i class="chip5k" style="margin-top:-'+5*w+'px"></i>')
|
|
break;
|
|
case k<10:
|
|
$(Thisclass).append('<i class="chip5k" style="margin-top:-'+5*w+'px"></i>')
|
|
for(var r=0;r<k-5;r++){
|
|
$(Thisclass).append('<i class="chip1k" style="margin-top:-'+5*(w+r+1)+'px"></i>')
|
|
}
|
|
break;
|
|
}
|
|
switch(true){
|
|
case b<5:
|
|
if(k<5){
|
|
for(var g=0;g<b;g++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*(g+w+k)+'px"></i>')
|
|
}
|
|
}else if(k==5){
|
|
for(var g=0;g<b;g++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*(g+w+1)+'px"></i>')
|
|
}
|
|
}else{
|
|
for(var g=0;g<b;g++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*(g+w+k-4)+'px"></i>')
|
|
}
|
|
}
|
|
break;
|
|
case b==5:
|
|
|
|
if(k<5){
|
|
$(Thisclass).append('<i class="chip500" style="margin-top:-'+5*(w+k)+'px"></i>')
|
|
}else if(k==5){
|
|
$(Thisclass).append('<i class="chip500" style="margin-top:-'+5*(w+1)+'px"></i>')
|
|
}else{
|
|
$(Thisclass).append('<i class="chip500" style="margin-top:-'+5*(w+k-4)+'px"></i>')
|
|
}
|
|
break;
|
|
case b<10:
|
|
if(k<5){
|
|
$(Thisclass).append('<i class="chip500" style="margin-top:-'+5*(w+k)+'px"></i>')
|
|
for(var r=0;r<b-5;r++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*(w+r+1+k)+'px"></i>')
|
|
}
|
|
}else if(k==5){
|
|
$(Thisclass).append('<i class="chip500" style="margin-top:-'+5*(w+1)+'px"></i>')
|
|
for(var r=0;r<b-5;r++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*(w+r+2)+'px"></i>')
|
|
}
|
|
}else{
|
|
$(Thisclass).append('<i class="chip500" style="margin-top:-'+5*(w+k-4)+'px"></i>')
|
|
for(var r=0;r<b-5;r++){
|
|
$(Thisclass).append('<i class="chip100" style="margin-top:-'+5*(w+r-3+k)+'px"></i>')
|
|
}
|
|
}
|
|
|
|
break;
|
|
}
|
|
switch(true){
|
|
case s<5:
|
|
if(k<5){
|
|
switch(true){
|
|
case b<5:
|
|
for(var g=0;g<s;g++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(g+w+b+k)+'px"></i>')
|
|
}
|
|
break;
|
|
case b==5:
|
|
for(var g=0;g<s;g++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(g+w+1+k)+'px"></i>')
|
|
}
|
|
break;
|
|
case b>5:
|
|
for(var g=0;g<s;g++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(g+w+b+k-4)+'px"></i>')
|
|
}
|
|
break;
|
|
}
|
|
}else if(k==5){
|
|
switch(true){
|
|
case b<5:
|
|
for(var g=0;g<s;g++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(g+w+b+1)+'px"></i>')
|
|
}
|
|
break;
|
|
case b==5:
|
|
for(var g=0;g<s;g++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(g+w+1+1)+'px"></i>')
|
|
}
|
|
break;
|
|
case b>5:
|
|
for(var g=0;g<s;g++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(g+w+b-3)+'px"></i>')
|
|
}
|
|
break;
|
|
}
|
|
}else{
|
|
switch(true){
|
|
case b<5:
|
|
for(var g=0;g<s;g++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(g+w+b+k-4)+'px"></i>')
|
|
}
|
|
break;
|
|
case b==5:
|
|
for(var g=0;g<s;g++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(g+w+k-3)+'px"></i>')
|
|
}
|
|
break;
|
|
case b>5:
|
|
for(var g=0;g<s;g++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(g+w+b+k-8)+'px"></i>')
|
|
}
|
|
break;
|
|
}
|
|
|
|
}
|
|
break;
|
|
case s==5:
|
|
if(k<5){
|
|
switch(true){
|
|
case b<5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+b+k)+'px"></i>')
|
|
break;
|
|
case b==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+1+k)+'px"></i>')
|
|
break;
|
|
case b>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+b+k-4)+'px"></i>')
|
|
break;
|
|
}
|
|
}else if(k==5){
|
|
switch(true){
|
|
case b<5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+b+1)+'px"></i>')
|
|
break;
|
|
case b==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+2)+'px"></i>')
|
|
break;
|
|
case b>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+b+3)+'px"></i>')
|
|
break;
|
|
}
|
|
}else{
|
|
switch(true){
|
|
case b<5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+b+k-4)+'px"></i>')
|
|
break;
|
|
case b==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+k-3)+'px"></i>')
|
|
break;
|
|
case b>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+k+b-8)+'px"></i>')
|
|
break;
|
|
}
|
|
}
|
|
|
|
break;
|
|
case s<10:
|
|
if(k<5){
|
|
switch(true){
|
|
case b<5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+b+k)+'px"></i>')
|
|
for(var r=0;r<s-5;r++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(w+r+1+b+k)+'px"></i>')
|
|
}
|
|
break;
|
|
case b==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+1+k)+'px"></i>')
|
|
for(var r=0;r<s-5;r++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(w+r+k+2)+'px"></i>')
|
|
}
|
|
break;
|
|
case b>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+b+k-4)+'px"></i>')
|
|
for(var r=0;r<s-5;r++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(w+r+b+k-3)+'px"></i>')
|
|
}
|
|
break;
|
|
}
|
|
|
|
}else if(k==5){
|
|
switch(true){
|
|
case b<5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+b+1)+'px"></i>')
|
|
for(var r=0;r<s-5;r++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(w+r+b+2)+'px"></i>')
|
|
}
|
|
break;
|
|
case b==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+2)+'px"></i>')
|
|
for(var r=0;r<s-5;r++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(w+r+3)+'px"></i>')
|
|
}
|
|
break;
|
|
case b>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+b-3)+'px"></i>')
|
|
for(var r=0;r<s-5;r++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(w+r+b-2)+'px"></i>')
|
|
}
|
|
break;
|
|
}
|
|
|
|
}else{
|
|
switch(true){
|
|
case b<5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+b+k-4)+'px"></i>')
|
|
for(var r=0;r<s-5;r++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(w+r+b+k-3)+'px"></i>')
|
|
}
|
|
break;
|
|
case b==5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+k-3)+'px"></i>')
|
|
for(var r=0;r<s-5;r++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(w+r+k-2)+'px"></i>')
|
|
}
|
|
break;
|
|
case b>5:
|
|
$(Thisclass).append('<i class="chip50" style="margin-top:-'+5*(w+b+k-8)+'px"></i>')
|
|
for(var r=0;r<s-5;r++){
|
|
$(Thisclass).append('<i class="chip10" style="margin-top:-'+5*(w+r+b+k-7)+'px"></i>')
|
|
}
|
|
break;
|
|
}
|
|
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|