1234567891011121314151617181920212223242526 |
- 'use strict';
- export default class PlayerId {
- constructor(playerName = '', playerColor = 'unk') {
- this.playerSocket = null;
- this.playerName = playerName;
- this.playerColor = playerColor;
- this.connected=false;
- }
- setSocket(socket) {
- this.playerSocket = socket;
- }
- setPlayerName(playerName) {
- this.playerName = playerName;
- }
- setPlayerColor(playerColor) {
- this.playerColor = playerColor;
- }
- setConnected(connected) {
- this.isConnected = connected;
- }
- isConnected() {
- return this.isConnected;
- }
- }
|