15 lines
304 B
JavaScript
15 lines
304 B
JavaScript
import * as log from "../log.mjs"
|
|
import * as revealer from "./revealer.mjs"
|
|
export function place(x, y, data) {
|
|
let tile = data[x][y];
|
|
if (tile.mask === true) {
|
|
if (tile.mask && tile.flag === 0) {
|
|
tile.mask = false;
|
|
}
|
|
|
|
data[x][y] = tile;
|
|
revealer.reveal(x, y, data)
|
|
}
|
|
return data;
|
|
}
|