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

31 lines
625 B
JavaScript

import { AExchangeable } from "../../AExchangable.js";
import { Point } from "./Point.js";
export class Position extends AExchangeable
{
/**
* @param {Point | Number} location
* @param {Number} time
*/
constructor(location, time)
{
super();
/**
* @type {Point | Number}
*/
this.location = location;
/**
* @type {Number}
*/
this.time = time;
}
/**
* @param {[]} additionalFieldList
*/
export(additionalFieldList)
{
super.export([...additionalFieldList + "location", "time"]);
}
}