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