40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
|
/*
|
||
|
Força: um (livre) clone do jogo Forca
|
||
|
Copyright (C) 2020 luca0N!
|
||
|
|
||
|
This program is free software: you can redistribute it and/or modify
|
||
|
it under the terms of the GNU General Public License as published by
|
||
|
the Free Software Foundation, either version 3 of the License, or
|
||
|
(at your option) any later version.
|
||
|
|
||
|
This program is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
GNU General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU General Public License
|
||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||
|
|
||
|
Entre em contato comigo por e-mail via <luca0n@luca0n.com>.
|
||
|
*/
|
||
|
|
||
|
class Cliente {
|
||
|
constructor(endereço, apelido, soquete){
|
||
|
this.endereço = endereço;
|
||
|
this.apelido = apelido;
|
||
|
this.soquete = soquete;
|
||
|
this.uas = Date.now(); // Última Ação Significativa: determina o tempo em que o último evento significativo deste jogador ocorreu. Utilizado para detectar usuários inativos.
|
||
|
this.pontos = 0;
|
||
|
|
||
|
this.opções = [];
|
||
|
this.pings = [];
|
||
|
}
|
||
|
acrescentarPontos(pontos){
|
||
|
this.pontos += pontos;
|
||
|
return pontos;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = Cliente;
|
||
|
|