MultiplayerMinesweeper/scripts/world/obfuscator.mjs

17 lines
339 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.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;
}