import { rankType } from '../../shared/protocols/rank/PtlOpen';
import { rankInfo } from '../../shared/protocols/type';
import { player } from '../../shared/protocols/user/type';
import { Rank } from './rank';


export class RankWzryCross extends Rank {

    countMaxNum = 9999;   // 不足256， 大乱斗之后补充npc
    getType(): rankType {
        return 'wzryCross';
    }
    // compare(other: rankInfo, cur: rankInfo): boolean {
    //     return cur.valArr[0] > other.valArr[0];
    // }
    // compareSort(a: rankInfo, b: rankInfo): number {
    //     return b.valArr[0] - a.valArr[0];
    // }

    // // 积分, 排名依据
    // getValArr(info: rankInfo):number|string {
    //     return info?.valArr[0] || 0
    // }

    async getPlayerRank(uid: string): Promise<number> {
		// 获取用户指定排名
        let rank = await this.getRankSortByOne(uid)
        return rank; // 原逻辑有+1操作，与其它地点取排名逻辑有差异
    }

    // async getRankList(uid: string, {gud, min, max }) {
    //     let rankList = await this.getRankListRange(min, max);
    //     let score = await this.getRankScore(uid)
    //     let rank = await this.getRankSortByOne(uid)

    //     return {
    //         rankList: rankList,
    //         myRank: {
    //             rank: rank,
    //             player: gud,
    //             valArr: [score]
    //         }
    //     };
    // }
}