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

Method constructor

assets/js/shooting_game.js:14–19  ·  view source on GitHub ↗
(x, y, radius, color)

Source from the content-addressed store, hash-verified

12
13class Player {
14 constructor(x, y, radius, color) {
15 this.x = x
16 this.y = y
17 this.radius = radius
18 this.color = color
19 }
20 draw() {
21 c.beginPath()
22 c.arc(this.x, this.y, this.radius, 0, Math.PI * 2, false)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected