()
| 50 | } |
| 51 | |
| 52 | function 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 | |
| 60 | function catchInsect() { |
| 61 | increaseScore() |