preferans-rating-js
Version:
nodejs rating for preferans
32 lines • 818 B
JavaScript
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
class PrefRatingPlayer {
constructor(username, rating, score) {
this._change = 0;
this._username = username;
this._oldRating = rating;
this._rating = rating;
this._score = score;
}
get score() {
return this._score;
}
get rating() {
return this._rating;
}
set change(change) {
this._change = change;
this._rating += change;
}
get json() {
return {
username: this._username,
score: this._score,
rating: this._rating,
change: this._change,
oldRating: this._oldRating
};
}
}
exports.default = PrefRatingPlayer;
//# sourceMappingURL=pref.rating.player.js.map