MCPcopy Create free account
hub / github.com/codemistic/Web-Development / isCollision

Function isCollision

JS - Chrome Dino Game Clone/script.js:44–51  ·  view source on GitHub ↗
(rect1, rect2)

Source from the content-addressed store, hash-verified

42}
43
44function isCollision(rect1, rect2) {
45 return (
46 rect1.left < rect2.right &&
47 rect1.top < rect2.bottom &&
48 rect1.right > rect2.left &&
49 rect1.bottom > rect2.top
50 )
51}
52
53function updateSpeedScale(delta) {
54 speedScale += delta * SPEED_SCALE_INCREASE

Callers 1

checkLoseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected