game: core: use server game calulation form
This commit is contained in:
20
frontend/static/js/api/game/Wall.js
Normal file
20
frontend/static/js/api/game/Wall.js
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
|
||||
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 }
|
Reference in New Issue
Block a user