MCPcopy Create free account
hub / github.com/code100x/plinkoo / constructor

Method constructor

frontend/src/game/classes/Ball.ts:17–28  ·  view source on GitHub ↗
(x: number, y: number, radius: number, color: string, ctx: CanvasRenderingContext2D, obstacles: Obstacle[], sinks: Sink[], onFinish: (index: number) => void)

Source from the content-addressed store, hash-verified

15 private onFinish: (index: number) => void;
16
17 constructor(x: number, y: number, radius: number, color: string, ctx: CanvasRenderingContext2D, obstacles: Obstacle[], sinks: Sink[], onFinish: (index: number) => void) {
18 this.x = x;
19 this.y = y;
20 this.radius = radius;
21 this.color = color;
22 this.vx = 0;
23 this.vy = 0;
24 this.ctx = ctx;
25 this.obstacles = obstacles;
26 this.sinks = sinks;
27 this.onFinish = onFinish;
28 }
29
30 draw() {
31 this.ctx.beginPath();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected