MiniSweeper
December 2013 - August 2022
Introduction:
A Minesweeper game in 481 bytes. Play with left click and right click.
It abuses tricks such as archaic HTML (table, bgcolor), emoji and a surprising amount of ~ operators.
The grid size is free, in the example below it's set to s = 9.
Website:
http://xem.github.io/MiniSweeper
Source code:
<table border id=t><script>b=[v=[]];f=[l=g=0];n=[];(r=d=>{for(M=!l;M;l=g)for(a=M=H="";s>++a;)for(j=s,H+="";~--j;H+=``+(f[I]?"⚑":b[I]&g?"💣":v[I]|g&&n[I]||""))for(I=a*s+j,T=d?b[I]=.1>Math.random():0,x=2;~x--;)for(y=2;~y--;~B&&B<s?(n[C]=~~n[C]+T)||v[I]|b[I]|!v[C]?0:v[I]=M=1:0)B=j+y,C=(a+x)*s+B;t.innerHTML=H})(s=9)</script>
Demo: