Play the game buy buying coins based on your available money. Every turn you are losing money as operating cost, you need to survive the game by buying and selling coins within this volatile market.
for(_='c.KKfillJfunctionW}W V:"+`or(_a.^;^);0200,24=new ma,th10"#f00";+", var =l(JText(58"e.push((b,d,ee[a].;b. ()6Style=returnMa.Kstrokeis.window.setTimeout(W{W m{ isVp{KclearRect(n.wid,n.heightJ"#aaa";Kfont="px";g(51g(21g(42f_a=4;0<=a;a-=50)4-8a+5"BUY",2SELL-ALL",4TIME`hCOINS`kCASH:$"+f.toFixed(4)FX$1`d,254f_a=0;a<e.leng;a++)--x,f,0>x&&e.splice(1if(!(h%)){b-35+h/d=min(max(d+b),39ab=0>b?0:1x=6y=4-dc=3a2,ab b=^b x=^x+1 c=^c-2 a^4*^a) y^y,^a-b.abf-=.1;d=380<d?250:d;if(0>f)}h++;requestAnimationFrame(p)Vg){KbeginPa;KrectVl(b){ flo_random*b+1)+a}n=q=b,c=c,h=e=[],k=f=d=1;m.prototype.f=W{b?"#0f0":g(x,y,c,a)};q.onmousedown=W(a){350>^x?(f--,k+=d):(f+=k/d,k=0)};p},1E3';G=/[-^-`VWJK]/.exec(_);)with(_.split(G))_=join(shift());eval(_)
Zm9yKF89J2MuS0tmaWxsSmZ1bmN0aW9uV31XIFY6Iitgb3IoX2EuXjteHyk7HjAeHTIwHDAsGzIbGhs0GT1uZXcgbRhhLBd0aBYxMBUiI2YwMCI7FCsiLCATdmFyIBI9bCgRSlRleHQoEDUZOB0QIg8eZS5wdXNoKA4oF2IsZCxlDGVbYV0uCztiLgkoKQgZNhsVGR0HU3R5bGU9BnJldHVybgVNYRYuBEtzdHJva2UDFmlzLgJ3aW5kb3cuAXNldFRpbWVvdXQoVwh7VyBtCHsFIBZpc1ZwCHtLY2xlYXJSZWN0KBsbbi53aWQWLG4uaGVpZ2h0HgMGFEoGIiNhYWEiO0tmb250PSIVcHgiO2coFRkaNRoxHmcoMjEHZyg0MgdmXxJhPTQcOzA8PWE7YS09NTApEDQcLRc4G2ErNR4QIkJVWSIsMg9TRUxMLUFMTCIsNA9USU1FYGgTQ09JTlNgaxNDQVNIOiQiK2YudG9GaXhlZCg0KRNGWCQxYGQsMjUZNB1mX2E9MDthPGUubGVuZxY7YSsrKS0tC3gsC2YILBUwPgt4JiZlLnNwbGljZSgXMR5pZighKGglFSkpexJiES0aMzUraC8VHWQ9BG1pbigEbWF4KBpkK2IpLDM5HWEYH2I9MD5iPzA6MR94PTYcH3k9NBwtZB9jPTMfYREyLBwOYR5iGAliPV5iCXg9XngrMQljPV5jLTIJYRFeFzQqXmEpCXkRXnksXmEtYi5hDmIeZi09LjE7ZD0zODA8ZD8yNTA6ZDtpZigwPmYpBX1oKys7AXJlcXVlc3RBbmltYXRpb25GcmFtZShwKVZnDCl7S2JlZ2luUGEWCDtLcmVjdAweAwhWbCgXYil7BSAEZmxvXwRyYW5kb20IKmIrMSkrYX0Sbj0BF3E9AWIsYz0BYyxoPRtlPVtdLGs9G2Y9GmQ9MRw7bS5wcm90b3R5cGUuZj1XCHsDBgJiPyIjMGYwIjoUZygCeCwCeSwCYywCYSl9O3Eub25tb3VzZWRvd249VyhhKXszNTA+Xng/KGYtLSxrKz1kKTooZis9ay9kLGs9MCl9O3AIfSwxRTMeJztHPS9bAS0fXi1gVldKS10vLmV4ZWMoXyk7KXdpdGgoXy5zcGxpdChHKSlfPWpvaW4oc2hpZnQoKSk7ZXZhbChfKQ==
/*
* Theme: The Volatile Coin Mine
*
*
* A basic buy and sell game. Buy coins using cash and sell them,
* you gradually lose cash over time. Display a graph with coin price over time.
*
* Increase coin volatility over time.
*
* Compress via https://siorki.github.io/regPack.html
* Compress via https://closure-compiler.appspot.com/home
*/
var a = document.getElementById('canvas');
var b = document.body;
var c = a.getContext('2d');
var framecount = 0; // delta count for every animation frame
var component = []; // sprite component container
var coins = 0; // game coins bought
var cash = 20.0000; // cash in hand
var coinforex = 120.0000; // initial forex exchange rate
/**
* r - Sprite function
* @constructor
*/
function r(){ return this; }
/**
* r.u - Sprite.Update function
*
*/
r.prototype.u = function(){
var s = this;
k(s.c);
q(s.x,s.y,s.w,s.h);
}
/**
* d - Draw function
*
*/
function k(k) {
c.strokeStyle=k?'#0f0':'#f00';
}
/**
* d - Draw function
*
*/
function d() {
c.clearRect(0,0,a.width,a.height);
k(0);
c.fillStyle ='#aaa';
c.font = "10px Consolas";
// create the graph
q(100,420,520,1);
q(210,460,100,40);
q(420,460,100,40);
// create graph the text values
for(var i=420;i>=0;i-=50) c.fillText(420-i,80,i+5);
// button - buy coins
c.fillText('BUY', 250, 480);
// button - sell coins
c.fillText('SELL-ALL', 450, 480);
// hud - current coin
c.fillText('TIME:'+framecount+', COINS:'+coins+', CASH:$'+cash.toFixed(4)+', FX $1:'+coinforex, 250, 440);
// animate the components
for(var i=0;i<component.length;i++) {
component[i].x-=1;
component[i].u();
if( component[i].x < 100 ) component.splice(i,1);
}
// price fluctuation
if(framecount%10==0) {
var fx = z(-20,35+framecount/100);
coinforex = Math.min(Math.max(20,coinforex+fx),390); // generate forex
var spriteblock = new r();
spriteblock.c=fx<0?0:1;
spriteblock.x=620;
spriteblock.y=420-coinforex;
spriteblock.w=3;
spriteblock.h=z(2,20);
component.push(spriteblock);
var spriteline = new r();
spriteline.c=spriteblock.c;
spriteline.x=spriteblock.x+1;
spriteline.w=spriteblock.w-2;
spriteline.h=z(spriteblock.h,spriteblock.h*4);
spriteline.y=z(spriteblock.y,spriteblock.h-spriteline.h);
component.push(spriteline);
cash-=0.1; // reduce cash over time
coinforex = coinforex>380?250:coinforex;
if( cash<0 ) return; // gameover, exit
}
framecount++;
window.requestAnimationFrame(d);
}
/**
* q - create rectangle in canvas
*/
function q(x,y,w,h){
c.beginPath()
c.rect(x,y,w,h);
c.stroke();
}
/**
* z - random integer
* @param n - minimum
* @param m - maximum is n+m
*/
function z(n,m) {
return Math.floor((Math.random()*m)+1)+n;
}
/**
* Control, mouse or touch
*
*/
b.onmousedown=function(e){
if(e.x<350) {
cash--;
coins+=coinforex;
}
else {
cash+=coins/coinforex;
coins=0;
}
}
/*
* Call draw canvas
*
*/
d();