MultiplayerMinesweeper/scripts/world/placer.mjs

15 lines
356 B
JavaScript

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;
}