Commit f696e479 authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent 9d858e2c
......@@ -11,6 +11,7 @@ async function run() {
let arrSide=[]
let arrRunup=[]
let levels = []
let levelPlus=[]
let types = []
for (let i = 0; i < configs.length; i++) {
......@@ -22,6 +23,7 @@ async function run() {
for (let j = 0; j < config.length; j++) {
levels.push(config[j].maxLevel)
levelPlus.push({type:config[j].type.split('targetPercentage:false')[1],level:config[j].maxLevel})
types.push(config[j].type.split('targetPercentage:false')[1])
let dateString = config[j].dateString.split('_')
let sideString = config[j].sideString.split('_')
......@@ -71,12 +73,15 @@ async function run() {
let levelSort = []
let typeSort = []
let sideSort=[]
let t=''
for (let i = 0; i < uniqLevels.length; i++) {
let counter = 0
for (let j = 0; j < levels.length; j++)
if (uniqLevels[i] === levels[j])
for (let j = 0; j < levelPlus.length; j++)
if (uniqLevels[i] === levelPlus[j].level) {
counter++
levelSort.push({level: uniqLevels[i], count: counter})
t=levelPlus[j].type
}
levelSort.push({level: uniqLevels[i],type:t, count: counter})
}
for (let i = 0; i < uniqType.length; i++) {
......@@ -155,32 +160,32 @@ async function run() {
// }
let newTypeSort=[]
for (let l = 0; l < uniqType.length; l++) {
let levelInline = []
let maxLevel=0
for (let i = 0; i < configs.length; i++) {
let config = await fs.readFileSync('./uniq/' + configs[i] + '/default/compound1000.json', 'utf8')
config = JSON.parse(config)
for (let j = 0; j < config.length; j++) {
if (config[j].type.split('targetPercentage:false')[1] === uniqType[l]) {
if (config[j].maxLevel >maxLevel)
maxLevel=config[j].maxLevel
}
}
}
newTypeSort.push({type: uniqType[l], maxLevel: maxLevel})
}
createConfileADV(JSON.stringify(newTypeSort, null, 2))
// let newTypeSort=[]
// for (let l = 0; l < uniqType.length; l++) {
// let levelInline = []
// let maxLevel=0
// for (let i = 0; i < configs.length; i++) {
//
//
// let config = await fs.readFileSync('./uniq/' + configs[i] + '/default/compound1000.json', 'utf8')
// config = JSON.parse(config)
//
//
// for (let j = 0; j < config.length; j++) {
// if (config[j].type.split('targetPercentage:false')[1] === uniqType[l]) {
// if (config[j].maxLevel >maxLevel)
// maxLevel=config[j].maxLevel
//
// }
//
// }
//
//
// }
//
// newTypeSort.push({type: uniqType[l], maxLevel: maxLevel})
// }
// createConfileADV(JSON.stringify(newTypeSort, null, 2))
// console.log(levelBaseDays)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment