MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / isCollide

Function isCollide

assets/js/carAvoidanceGame.js:17–21  ·  view source on GitHub ↗
(a,b)

Source from the content-addressed store, hash-verified

15 keys[e.key]=false;
16}
17function 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}
22function moveLines() {
23 let lines=document.querySelectorAll('.lines');
24 lines.forEach(function(item){

Callers 1

moveEnemyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected