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

Function getRandomLocation

assets/js/InsectCatch.js:52–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50}
51
52function getRandomLocation() {
53 const width = window.innerWidth
54 const height = window.innerHeight
55 const x = Math.random() * (width - 200) + 100
56 const y = Math.random() * (height - 200) + 100
57 return { x, y }
58}
59
60function catchInsect() {
61 increaseScore()

Callers 1

createInsectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected