13 lines
310 B
JavaScript
13 lines
310 B
JavaScript
|
import * as revealer from "./revealer.js";
|
||
|
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;
|
||
|
}
|