(() => {
var mogura1;
var mogura2;
var mogura3;
 
var tensu;
var sum;
var end;
var button;
 
button.onclick = function (){
	startgame()
}
 
function startgame(){
    mogura1 = document.getElementById("image1");
    mogura2 = document.getElementById("image2");
    mogura3 = document.getElementById("image3");
    sum = document.getElementById("ten");
 
    button = document.getElementById("start");
    button.onclick = function(){
	end = false;
	tensu = 0;
	sum.innerHTML = tensu;
	startgame();
    }
    mogura1.onclick = function(){
	mogura1.src="mogurax.png"
	setTimeout(modosu1,1000);
	tensu = tensu + 1;
	goukei.innerHTML = tensu;
    }
    mogura2.onclick = function(){
	mogura2.src="mogurax.png"
	setTimeout(modosu2,1000);
	tensu = tensu + 1;
	goukei.innerHTML = tensu;
    }
    mogura3.onclick = function(){
	mogura3.src="mogurax.png"
	setTimeout(modosu3,1000);
	tensu = tensu + 1;
	goukei.innerHTML = tensu;
    }
   
 
    setTimeout(endgame,60000)
}
 
function endgame(){
    alert("おしまい!!!")
    end = true;}
 
 

 
})();
