17 lines
339 B
JavaScript
17 lines
339 B
JavaScript
|
|
||
|
export function obfuscate(world) {
|
||
|
let tempWorld = world;
|
||
|
for(let x = 0; x < tempWorld.dimensions[0]; x++){
|
||
|
for(let y = 0; y < tempWorld.dimensions[1]; y++){
|
||
|
|
||
|
if (tempWorld.data[x][y].mask === true) {
|
||
|
|
||
|
tempWorld.data[x][y].type = 0;
|
||
|
};
|
||
|
tempWorld.isObfuscated = true;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
return tempWorld;
|
||
|
}
|