Skip to content

Commit 47b6e17

Browse files
author
mydicebot
committed
v190625
1 parent fdd0b81 commit 47b6e17

File tree

5 files changed

+32
-89
lines changed

5 files changed

+32
-89
lines changed

src/api/models/simulator.js

+2-50
Original file line numberDiff line numberDiff line change
@@ -51,71 +51,23 @@ export class Simulator extends BaseDice {
5151

5252
async clear(req) {
5353
let userName = req.session.username;
54-
let currency = req._parsedOriginalUrl.query.toLowerCase();
55-
5654
let info = {};
57-
5855
info.info = {
5956
'bets' : 0,
6057
'wins' : 0,
6158
'losses' : 0,
6259
'profit' : 0,
6360
'wagered' : 0,
64-
'balance' : 0.001,
61+
'balance' : 1000000,
6562
};
6663
info.currentInfo = {
6764
'bets' : 0,
6865
'wins' : 0,
6966
'losses' : 0,
7067
'profit' : 0,
7168
'wagered' : 0,
72-
'balance' : 0.001,
73-
}
74-
75-
76-
switch(currency) {
77-
78-
case "currency=btc":{
79-
80-
info.info.balance=1.000000000*0.01;
81-
82-
break;
83-
}
84-
case "currency=eth":{
85-
86-
info.info.balance=1.000000000*0.001;
87-
88-
break;
89-
}
90-
91-
case "currency=ltc":{
92-
93-
info.info.balance=1.000000000;
94-
95-
break;
96-
}
97-
98-
case "currency=doge":{
99-
100-
info.info.balance=1.000000000*1000;
101-
102-
break;
103-
}
104-
105-
case "currency=bch":{
106-
107-
info.info.balance=1.000000000;
108-
109-
break;
110-
}
111-
112-
default:{
113-
info.info.balance=1.000000000;
114-
}
69+
'balance' : 1000000,
11570
}
116-
117-
info.info.balance=info.info.balance.toFixed(8);
118-
11971
info.info.success = 'true';
12072
req.session.info = info;
12173
return info;

src/app.js

100644100755
File mode changed.

src/package.json

100644100755
File mode changed.

src/public/js/Simulator/info.js

+3-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
function init() {
22
console.log('hello Simulator');
3-
let currencies = ["btc","eth","ltc","doge","dash","bch","xrp","zec","etc","neo","kmd","btg","lsk","dgb","qtum","strat","waves","burst"];
4-
5-
let options=[];
6-
7-
for(i=0;i<currencies.length;i++){
8-
9-
options.push({id:i,value:(currencies[i]).toUpperCase()});
10-
11-
}
12-
13-
$$("bet_currency_selection").define("options", options);
14-
3+
$$("bet_currency_selection").define("options", [
4+
{id:1,value:"BTC"},
5+
]);
156
minBetAmount = 0.1;
167
$$("manual_bet_amount").setValue(minBetAmount);
178
$$("auto_bet_base_amount").setValue(minBetAmount);

src/public/js/webix_codemirror.js

+27-27
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,42 @@ webix.protoUI({
1616

1717

1818
var sources = [];
19-
sources.push("/js/code/codemirror.js");
20-
sources.push("/js/code/javascript.js");
21-
sources.push("/js/code/lua.js");
22-
sources.push("/js/code/matchbrackets.js");
19+
sources.push("http://localhost:57432/js/code/codemirror.js");
20+
sources.push("http://localhost:57432/js/code/javascript.js");
21+
sources.push("http://localhost:57432/js/code/lua.js");
22+
sources.push("http://localhost:57432/js/code/matchbrackets.js");
2323
//fullscreen
24-
sources.push("/js/code/codemirror_addon_fullscreen.js");
24+
sources.push("http://localhost:57432/js/code/codemirror_addon_fullscreen.js");
2525
//lint
26-
sources.push("/js/code/lint.js");
27-
sources.push("/js/code/javascript-lint.js");
28-
sources.push("/js/code/jshint.js");
26+
sources.push("http://localhost:57432/js/code/lint.js");
27+
sources.push("http://localhost:57432/js/code/javascript-lint.js");
28+
sources.push("http://localhost:57432/js/code/jshint.js");
2929
//match-hightlighter
30-
sources.push("/js/code/annotatescrollbar.js");
31-
sources.push("/js/code/matchesonscrollbar.js");
32-
sources.push("/js/code/match-highlighter.js");
33-
sources.push("/js/code/searchcursor.js");
30+
sources.push("http://localhost:57432/js/code/annotatescrollbar.js");
31+
sources.push("http://localhost:57432/js/code/matchesonscrollbar.js");
32+
sources.push("http://localhost:57432/js/code/match-highlighter.js");
33+
sources.push("http://localhost:57432/js/code/searchcursor.js");
3434
//fold
35-
sources.push("/js/code/foldcode.js");
36-
sources.push("/js/code/foldgutter.js");
37-
sources.push("/js/code/comment-fold.js");
38-
sources.push("/js/code/brace-fold.js");
35+
sources.push("http://localhost:57432/js/code/foldcode.js");
36+
sources.push("http://localhost:57432/js/code/foldgutter.js");
37+
sources.push("http://localhost:57432/js/code/comment-fold.js");
38+
sources.push("http://localhost:57432/js/code/brace-fold.js");
3939
//lua
40-
//sources.push("/js/code/parselua.js");
40+
//sources.push("http://localhost:57432/js/code/parselua.js");
4141
//python
42-
sources.push("/js/code/python.js");
42+
sources.push("http://localhost:57432/js/code/python.js");
4343
//active-line
44-
sources.push("/js/code/active-line.js");
44+
sources.push("http://localhost:57432/js/code/active-line.js");
4545
//change
46-
sources.push("/js/code/change.js");
46+
sources.push("http://localhost:57432/js/code/change.js");
4747

48-
sources.push("/css/code/codemirror.css");
49-
sources.push("/css/code/night.css");
50-
sources.push("/css/code/codemirror_addon_fullscreen.css");
51-
sources.push("/css/code/lint.css");
52-
sources.push("/css/code/highlight.css");
53-
sources.push("/css/code/foldgutter.css");
54-
//sources.push("/css/code/luacolors.css");
48+
sources.push("http://localhost:57432/css/code/codemirror.css");
49+
sources.push("http://localhost:57432/css/code/night.css");
50+
sources.push("http://localhost:57432/css/code/codemirror_addon_fullscreen.css");
51+
sources.push("http://localhost:57432/css/code/lint.css");
52+
sources.push("http://localhost:57432/css/code/highlight.css");
53+
sources.push("http://localhost:57432/css/code/foldgutter.css");
54+
//sources.push("http://localhost:57432/css/code/luacolors.css");
5555

5656
webix.require(sources)
5757
.then( webix.bind(this._render_when_ready, this) )

0 commit comments

Comments
 (0)