(a,b)
| 15 | keys[e.key]=false; |
| 16 | } |
| 17 | function isCollide(a,b){ |
| 18 | aRect=a.getBoundingClientRect(); |
| 19 | bRect=b.getBoundingClientRect(); |
| 20 | return !((aRect.top > bRect.bottom)||(aRect.bottom < bRect.top)||(aRect.right < bRect.left)||(aRect.left > bRect.right)); |
| 21 | } |
| 22 | function moveLines() { |
| 23 | let lines=document.querySelectorAll('.lines'); |
| 24 | lines.forEach(function(item){ |