MultiplayerMinesweeper/scripts/world/obfuscator.mjs

17 lines
324 B
JavaScript
Raw Normal View History

2022-06-22 01:51:09 +00:00
export function obfuscate(world) {
let tempWorld = world;
for(let x = 0; x < tempWorld.width; x++){
for(let y = 0; y < tempWorld.height; y++){
2022-06-22 01:51:09 +00:00
if (tempWorld.data[x][y].mask === true) {
tempWorld.data[x][y].type = 0;
};
tempWorld.isObfuscated = true;
}
}
return tempWorld;
}