42_ft_transcendence/frontend/static/js/api/game/pong/Point.js

33 lines
521 B
JavaScript

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 };