javascript 5次下注后增加的基础筹码

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 5次下注后增加的基础筹码相关的知识,希望对你有一定的参考价值。

const baseBet = 1
const baseTarget = 10
const baseSkips = 4
const resetSkipsAt = 12
const betsPlaced = 5
const multiplierBet = 2
const maxLossBeforeMultiplierBet = 15
const maximumProfit = this.balance/100 * 1.5  /* You can put just any value here  */
const stopLoss = 0
const maximumBet = 128
let bet = baseBet
let target = baseTarget
let lost = 0
let win = 0
let started = 0
let skips = baseSkips

while(true){
if (this.balance / 100 < stopLoss){this.log(`StopLoss triggered at ${stopLoss} and terminated`)
await this.stop()}
if (this.balance / 100 > maximumProfit ){this.log(`Maximum profit of ${maximumProfit} was reached!`)
await this.stop()}
if (lost >= maxLossBeforeMultiplierBet){
            bet = bet * multiplierBet
lost = 0
        }

        
    if (skips >= resetSkipsAt){skips = baseSkips}
    for (var i = 0; i < skips ; i++){
        await this.skip()
        if(i == 0){
if(win > 0){bet = baseBet
win = 0}
if (this.balance / 100 < stopLoss){this.log(`StopLoss triggered at ${stopLoss} and terminated`)
await this.stop()}
            started = 1
        }
     }
     
    for (var i = 0; i < betsPlaced; i++){
this.log(`Counter for next increase bet: ${lost}(${maxLossBeforeMultiplierBet })`)
if (bet >= maximumBet){bet = baseBet}
        var{multiplier} = await this.bet(bet*100, baseTarget)
        if(i == 0){
            started = 0
            skips = skips + 1
if (this.balance / 100 < stopLoss){this.log(`StopLoss triggered at ${stopLoss} and terminated`)
await this.stop()}
        }
     }
    if (multiplier< baseTarget){
        lost++
win = 0
    }else{
win++
this.log("win")

lost = 0
}
}

以上是关于javascript 5次下注后增加的基础筹码的主要内容,如果未能解决你的问题,请参考以下文章

1071 小赌怡情 (15分)

PAT 1071. 小赌怡情

PAT 乙级 1071 小赌怡情(15 分)

棋牌源码搭建-梭哈算法思路

PAT 1071. 小赌怡情(15) JAVA

jQuery单击事件多次触发