core: split: game and pong
This commit is contained in:
32
frontend/static/js/api/game/pong/Point.js
Normal file
32
frontend/static/js/api/game/pong/Point.js
Normal file
@ -0,0 +1,32 @@
|
||||
import { AExchangeable } from "../../AExchangable.js";
|
||||
|
||||
class Point extends AExchangeable
|
||||
{
|
||||
/**
|
||||
* @param {Number} x
|
||||
* @param {Number} y
|
||||
*/
|
||||
constructor(x, y)
|
||||
{
|
||||
super();
|
||||
|
||||
/**
|
||||
* @type {Number}
|
||||
*/
|
||||
this.x = x;
|
||||
/**
|
||||
* @type {Number}
|
||||
*/
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {[String]}
|
||||
*/
|
||||
export(additionalFieldList)
|
||||
{
|
||||
super.export([...additionalFieldList, "x", "y"])
|
||||
}
|
||||
}
|
||||
|
||||
export { Point };
|
Reference in New Issue
Block a user