const holes = document.querySelectorAll('.hole');
const moles = document.querySelectorAll('.mole');
const scoreBoard = document.getElementById('score');
const startButton = document.getElementById('startButton');

let lastHole;
let timeUp = false;
let score = 0;
let duration = 30

function randomTime(min, max) {
    return Math.round(Math.random() * (max - min) + min);
}

function randomHole(holes) {
    const idx = Math.floor(Math.random() * holes.length);
    const hole = holes[idx];
    if (hole === lastHole) {
        return randomHole(holes);
    }
    lastHole = hole;
    return hole;
}

function peep() {
    const time = randomTime(1000, 1500);
    const  hole = randomHole(holes);

	// TODO
	
    setTimeout(() => {

	// TODO
		//
     	   }}, time);
}

function startGame() {
    scoreBoard.textContent = 0;
    score = 0;
    timeUp = false;

	// TODO
}

function bonk(e) {

	// TODO
	
}

moles.forEach(mole => mole.addEventListener('click', bonk));
startButton.addEventListener('click', startGame);
