UNPKG

preferans-rating-js

Version:
33 lines 868 B
#!/usr/bin/env node '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=prefRatingPlayer.js.map