()
| 69 | /* drawing functions */ |
| 70 | // function to draw net |
| 71 | function drawNet() { |
| 72 | // set the color of net |
| 73 | ctx.fillStyle = net.color; |
| 74 | |
| 75 | // syntax --> fillRect(x, y, width, height) |
| 76 | ctx.fillRect(net.x, net.y, net.width, net.height); |
| 77 | } |
| 78 | |
| 79 | // function to draw score |
| 80 | function drawScore(x, y, score) { |