Source: struct/Score.js

'use strict';

/**
 * General Score class
 * @memberof module:CustomClasses
 * @property {Number} score Score achieved
 * @property {Number} scoreId Score ID
 * @property {Number} count300
 * @property {Number} count100
 * @property {Number} count50
 * @property {Number} countMiss
 * @property {Number} maxCombo
 * @property {Number} countKatu
 * @property {Number} countGeki
 * @property {Boolean} perfect True if maximum combo reached of map
 * @property {Number} enabledMods Bitwise flag of mods used generated by the C#
 */
class Score {
    constructor(data) {
        this.scoreId = Number(data.score_id);
        this.score = Number(data.score);
        this.count300 = Number(data.count300);
        this.count100 = Number(data.count100);
        this.count50 = Number(data.count50);
        this.countMiss = Number(data.countmiss);
        this.maxCombo = Number(data.maxcombo);
        this.countKatu = Number(data.countkatu);
        this.countGeki = Number(data.countgeki);
        this.perfect = !!Number(data.perfect);
        this.enabledMods = Number(data.enabled_mods);
    }
}

module.exports = Score;