ft_transcendence/django/frontend/static/js/api/game/pong/Wall.js
2024-08-27 18:09:09 +02:00

30 lines
567 B
JavaScript

import { Point } from "./Point.js";
import { PongGame } from "./PongGame.js";
import { Segment } from "./Segment.js";
import { renderCube} from "../../../3D/cube.js"
export class Wall extends Segment
{
/**
* @param {PongGame} game
* @param {Point} start
* @param {Point} stop
*/
constructor(game, start, stop)
{
super(game, start, stop)
/**
* @type {PongGame}
*/
this.game = game
}
draw(ctx)
{
ctx.moveTo(this.start.x, this.start.y);
ctx.lineTo(this.stop.x, this.stop.y);
}
}