23 lines
444 B
JavaScript
23 lines
444 B
JavaScript
|
// player.js
|
||
|
class Player {
|
||
|
constructor(id, ip, name, guid, elo = 1000, score = 0, team = '') {
|
||
|
this.id = id;
|
||
|
this.ip = ip;
|
||
|
this.name = name;
|
||
|
this.guid = guid;
|
||
|
this.elo = elo;
|
||
|
this.score = score;
|
||
|
this.team = team;
|
||
|
this.is_alive = true;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function removeColorCodes(name) {
|
||
|
return name.replace(/\^\d/g, '');
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
Player,
|
||
|
removeColorCodes,
|
||
|
};
|