@aral
var f=()=>{
var c=(i,j)=>{
return document.getElementById('pixel-'+i+'-'+j)
}
var iA=(i,j)=>{
return (c(i,j).style.backgroundColor=='black')
}
for(var i=0; i<20; i++){
for(var j=0; j<20; j++){
var n=-iA(i,j)
for (var k=i-1;k<i+2;k++){
for (var l=j-1;l<j+2;l++){
n += (k>19 || k<0 || l>19 || l<0) ? 0 : iA(k,l)
}
}
if((iA(i,j) && (n<2 || n>3)) || (!iA(i,j) && n==3))
c(i,j).cN=true
else
c(i,j).cN=false
}
}
for(var i=0; i<20; i++){
for(var j=0; j<20; j++){
if (c(i,j).cN)
c(i,j).click()
}
}
}
var r=setInterval(f,1000)
clearInterval(r)
Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
Ciourte Piaille (ciourte@piaille.fr)'s status on Sunday, 24-Mar-2024 16:23:48 JSTCiourte Piaille