(x, y, score)
| 78 | |
| 79 | // function to draw score |
| 80 | function drawScore(x, y, score) { |
| 81 | ctx.fillStyle = 'white'; |
| 82 | ctx.font = '35px sans-serif'; |
| 83 | |
| 84 | // syntax --> fillText(text, x, y) |
| 85 | ctx.fillText(score, x, y); |
| 86 | |
| 87 | |
| 88 | |
| 89 | } |
| 90 | |
| 91 | // function to draw paddle |
| 92 | function drawPaddle(x, y, width, height, color) { |