core: split: game and pong
This commit is contained in:
31
frontend/static/js/api/game/pong/Position.js
Normal file
31
frontend/static/js/api/game/pong/Position.js
Normal file
@ -0,0 +1,31 @@
|
||||
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"]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user