Last active
November 7, 2017 17:38
-
-
Save jdleo/d2a9c6f0d3e0dbe9b17dd6aa715f6a60 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /** CONFIG. YOU CAN EDIT VALUES ON THE RIGHT **/ | |
| const baseBet = 100 //base bet in SATOSHIS | |
| const baseTarget = 1.2 //base target | |
| const increaseAfterX = 200 //increase the bet after this many rolls | |
| const targetIncrease = 1.2 //will add this to the target to increase every time | |
| const increaseBy = 2 //this is the multiplier the bet will increase by | |
| /** END CONFIG **/ | |
| let x = 0 //definitely do not touch | |
| let target = baseTarget //dont touch | |
| let bet = baseBet //dont touch | |
| while (true) { | |
| const {multiplier} = await this.bet(bet, target) | |
| if (increaseAfterX == x) { | |
| target = baseTarget | |
| x = 0 | |
| bet = baseBet * increaseBy | |
| } | |
| if (multiplier < target) { | |
| //loss | |
| this.log(`LOSS!`) | |
| target = target + targetIncrease | |
| x++ | |
| } else { | |
| //win | |
| this.log(`WIN!`) | |
| target = baseTarget | |
| bet = baseBet | |
| x = 0 | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment