core: split: game and pong

This commit is contained in:
2024-04-05 17:47:17 +02:00
parent c49e721e5a
commit f6f59f8ead
34 changed files with 965 additions and 784 deletions

View 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"]])
}
}