document.addEventListener("DOMContentLoaded", function() {
        let table = document.getElementById('table');
        let table2 = document.getElementById('table2');
        let atari = document.getElementById('atari');
        let atari2 = document.getElementById('atari2');
        let selectedCell = [];
        table.addEventListener("click", function(event)  {
    	if(event.target.tagName ==='TD'&& !event.target.classList.contains('hidden')){
    	    atari.textContent = event.target.textContent;
    	    event.target.classList.add('selected');
    	    selectedCell.push(event.target);
    	    check();
    	}
     
        }
    			  );
        table2.addEventListener("click", function(event2)  {
    	if(event2.target.tagName ==='TD'&& !event2.target.classList.contains('hidden')){
    	    atari2.textContent = event2.target.textContent;
    	    event2.target.classList.add('selected');
    	    selectedCell.push(event2.target);
    	    check();
    	};
     
        });
        function check(){
        	var classa = document.querySelector('.aiu');
        	var classb = document.querySelector('.info');
        	
        	var valuea = classa.getAttribute('value');
        	var valueb = classb.getAttribute('value');
        	
        	var tf = (valuea === valueb);
        	console.log (tf)
        	//{
    		//cell1.classList.add('hidden');
    		//cell2.classList.add('hidden');
    	    //}else{
    		//cell1.classList.remove('selected');
    		//cell2.classList.remove('selected');
    	    }
    	    //selectedCell = [];
    	//}
        //}
        });
