MultiplayerMinesweeper/scripts/world/placer.mjs

15 lines
356 B
JavaScript
Raw Normal View History

2022-06-22 01:51:09 +00:00
import * as log from "../log.mjs"
import * as revealer from "./revealer.mjs"
export function place(data, location, id) {
let tile = data[location[0]][location[1]];
if (tile.mask === true) {
if (tile.mask && tile.flag === 0) {
tile.mask = false;
}
data[location[0]][location[1]] = tile;
revealer.reveal(data, location)
}
return data;
}