42_ft_transcendence/frontend/static/js/api/game/Wall.js
2024-02-10 19:38:56 +01:00

30 lines
420 B
JavaScript

import { Segment } from "./Segment.js";
class Wall
{
/**
* @param {Segment} start
*/
constructor (rail)
{
/**
* @type {Segment}
*/
this.rail = rail === undefined ? new Segment() : rail;
}
draw(ctx)
{
this.rail.draw(ctx);
}
from_json(data)
{
this.rail = this.rail.from_json(data.rail)
return this
}
}
export { Wall }