core: split: game and pong
This commit is contained in:
39
frontend/static/js/api/game/APlayer.js
Normal file
39
frontend/static/js/api/game/APlayer.js
Normal file
@ -0,0 +1,39 @@
|
||||
import { Client } from "../Client.js";
|
||||
import { Profile } from "../Profile.js";
|
||||
import { AGame } from "./AGame.js";
|
||||
|
||||
export class APlayer extends Profile
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param {Client} client
|
||||
* @param {AGame} game
|
||||
* @param {Number} id
|
||||
* @param {String} username
|
||||
* @param {String} avatar
|
||||
* @param {Boolean} isConnected
|
||||
*/
|
||||
constructor (client, game, id, username, avatar, isConnected)
|
||||
{
|
||||
super(client, username, id, avatar);
|
||||
|
||||
/**
|
||||
* @type {AGame}
|
||||
*/
|
||||
this.game = game
|
||||
|
||||
/**
|
||||
* @type {Boolean}
|
||||
*/
|
||||
this.isConnected = isConnected;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {[String]} additionalFieldList
|
||||
*/
|
||||
export(additionalFieldList = [])
|
||||
{
|
||||
super.export([...additionalFieldList, ...["isConnected"]])
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user