| 357 | }; |
| 358 | |
| 359 | function showDesign(event) |
| 360 | { |
| 361 | while(j==1) |
| 362 | { |
| 363 | d1=parseInt(Date.now()); |
| 364 | j=0; |
| 365 | } |
| 366 | box=event.target; |
| 367 | let x=box.childNodes[0]; |
| 368 | if(x.style.visibility==="hidden"){ |
| 369 | x.style.visibility="visible"; |
| 370 | box.setAttribute('a','1'); |
| 371 | counter.push(box); |
| 372 | l=counter.length; |
| 373 | } |
| 374 | setTimeout(() => {if(match==2&&l==2) |
| 375 | check(counter); |
| 376 | if(match==4&& l==4) |
| 377 | check(counter);}, 300); |
| 378 | }; |
| 379 | function check(counter){ |
| 380 | document.getElementById("mov").innerHTML = " "+(++moves); |
| 381 | |