This commit is contained in:
An Orbit 2023-04-19 17:31:21 -04:00 committed by GitHub
parent f75ebb5973
commit 9b70563b1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 0 deletions

View File

@ -1613,6 +1613,32 @@
return !isEmpty(x,y+1,true);
};
//Freeze pixel
function freezePixel(pixel,changetemp=true) {
var info = elements[pixel.element];
var result = info.stateLow;
if (!result) {
return false
};
if(result instanceof Array) {
result = result.filter(elementExists);
if(result.length == 0) {
return false;
};
} else {
if(!(elementExists(result))) {
return false;
};
};
while(result instanceof Array) {
result = randomChoice(result);
};
changePixel(pixel,result,changetemp);
return true;
};
//Logic
function xor(c1,c2) {