JSFiddle - React, Tailwind, and code Playground
by Elguja Bogveradze
JavaScript
var sbet = 0.00000001,
stopp = 0.001,
delaymin = 500,
delaymax = 1000,
stopa = 1,
pause = 0.5,
stopb = 3,
balance = 0,
profit = 0,
working = 0,
working2 = 0,
rollcount = 1,
loseroll = 0,
stop = false,
stopaw = false,
consoleclear = true,
n = 6;
var $loButton = $('#double_your_btc_bet_lo_button'),
$hiButton = $('#double_your_btc_bet_hi_button');
$('#double_your_btc_bet_lose').unbind();
$('#double_your_btc_bet_win').unbind();
function clearcodes(p) {
consoleclear = p;
}
function tofix8(n) {
return parseFloat(n).toFixed(8);
}
function stopgaw() {
stopaw = true;
console.log("თამაში დასრულდება შემდეგ მოგებაზე");
}
function fms(ms) {
ms /= 1000;
if (ms < 1) return ms + " წამი";
else if (ms <= 60) return Math.round(ms) + " წამი";
else if (ms <= 3600) return Math.round(ms / 60) + " წუთი";
else return Math.round(ms / 3600) + " საათი";
}
function reset() {
rolln = 0;
$('#double_your_btc_stake').val(sbet);
}
function deexponentize(number) {
return number * 1000000;
}
function pauseafter() {
if ((stopa * 60000) <= working2) {working2=0;return pause * 60000;}
return waittime();
}
function startGame() {
working = 0, rollcount = 0, profit = 0, stopaw = false;
if (consoleclear) console.clear();
console.log('თამაში დაიწყო!');
balance = tofix8($('#balance').text());
reset();
$loButton.trigger('click');
}
function stopGame() {
console.log("თამაში დასრულდა");
stop = true;
stopaw = false;
}
function waittime() {
return Math.floor(Math.random() * (delaymax - delaymin + 1)) + delaymin;
}
function checkbalance() {
var c = deexponentize(tofix8($('#balance').text()));
var t = deexponentize($('#double_your_btc_stake').val());
return ((c * 2) / 100) * (t * 2) > stopp / 100;
}
function timetocollet() {
var minutes = parseInt($('title').text());
if (minutes < stopb) {
console.log('თამაში შეჩერდა. დროა BTC-ს აგროვების');
stopGame();
return true;
}
return false;
}
function multiply()...