const $life = document.querySelector('#life');
const $$cells = document.querySelectorAll('.cell');
(중략)
let life = 3;
let timerId;
let tickId;
$start.addEventListener('click', () => {
(중략)
console.log('시작');
timerId = setInterval(() => {
(중략)
}, 100);
tickId = setInterval(tick, 1000);
});
(중략)
$$cells.forEach(($cell, index) => {
(중략)
$cell.querySelector('.bomb').addEventListener('click', (event) => {
(중략)
setTimeout(() => {
holes[index] = 0;
event.target.classList.remove('boom');
}, 1000);
life--;