42_ft_transcendence/frontend/static/js/api/game/Wall.js

20 lines
421 B
JavaScript

class Wall
{
constructor (rail_start_x, rail_start_y, rail_stop_x, rail_stop_y)
{
this.rail_start_x = rail_start_x;
this.rail_start_y = rail_start_y;
this.rail_stop_x = rail_stop_x;
this.rail_stop_y = rail_stop_y;
}
draw(ctx)
{
ctx.moveTo(this.rail_start_x, this.rail_start_y);
ctx.lineTo(this.rail_stop_x, this.rail_stop_y);
}
}
export { Wall }