// 排行榜表
import { readFileAndParse } from '../util'
import { FILENAME } from '../../consts'

export interface DicRecruit {

    // id
    readonly id: number;
    // 武将id
    readonly actorId: number;
    // 权重
    readonly weight: number;

}

export const dicRecruit = new Array<DicRecruit>();
export function loadRecruit() {
    dicRecruit.splice(0, dicRecruit.length);
    let arr = readFileAndParse(FILENAME.DIC_RECRUIT);

    arr.forEach(o => {
        dicRecruit.push(o);
    });
    
    arr = undefined;
}