42_ft_transcendence/frontend/static/js/api/game/Wall.js
2024-03-31 10:59:39 +02:00

29 lines
431 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 };