황성연

구조 수정

......@@ -155,56 +155,6 @@ module.exports = function(app){
}
champ_name[champ_name.length] = "total";
var temp_id;
var temp_name;
var temp_point;
var temp_pic;
for(var i=0; i < champ_id.length-1; i++){
for(var j=i+1;j <champ_id.length-1; j++)
if(champ_point[i] > champ_point[j]){
temp_id = champ_id[i];
temp_name = champ_name[i];
temp_point = champ_point[i];
temp_pic = champ_pic[i];
champ_id[i] = champ_id[j]
champ_name[i] = champ_name[j];
champ_point[i] = champ_point[j];
champ_pic[i] = champ_pic[j];
champ_id[j] = temp_id
champ_name[j] = temp_name;
champ_point[j] = temp_point;
champ_pic[j] = temp_pic;
}
}
const defaultMMR = [
{"mmr" : 900, "tier" : "iron", "rank": 4},
{"mmr" : 950, "tier" : "iron", "rank": 3},
{"mmr" : 1000, "tier" : "iron", "rank": 2},
{"mmr" : 1050, "tier" : "iron", "rank": 1},
{ "mmr" : 1100, "tier" : "bronze", "rank": 4 },
{ "mmr" : 1150, "tier" : "bronze", "rank": 3 },
{ "mmr" : 1200, "tier" : "bronze", "rank": 2 },
{ "mmr" : 1250, "tier" : "bronze", "rank": 1 },
{ "mmr" : 1300, "tier" : "silver", "rank": 4 },
{ "mmr" : 1350, "tier" : "silver", "rank": 3 },
{ "mmr" : 1400, "tier" : "silver", "rank": 2 },
{ "mmr" : 1450, "tier" : "silver", "rank": 1 },
{ "mmr" : 1500, "tier" : "gold", "rank": 4 },
{ "mmr" : 1550, "tier" : "gold", "rank": 3 },
{ "mmr" : 1600, "tier" : "gold", "rank": 2 },
{ "mmr" : 1650, "tier" : "gold", "rank": 1 },
{ "mmr" : 1700, "tier" : "platinum", "rank": 4 },
{ "mmr" : 1750, "tier" : "platinum", "rank": 3 },
{ "mmr" : 1800, "tier" : "platinum", "rank": 2 },
{ "mmr" : 1850, "tier" : "platinum", "rank": 1 },
{ "mmr" : 1900, "tier" : "diamond", "rank": 4 },
{ "mmr" : 1950, "tier" : "diamond", "rank": 3 },
{ "mmr" : 2000, "tier" : "diamond", "rank": 2 },
{ "mmr" : 2050, "tier" : "diamond", "rank": 1 },
{ "mmr" : 2100, "tier" : "master", "rank": 1 },
{ "mmr" : 2700, "tier" : "challenger", "rank": 1 },
]
var spellUrl = "http://ddragon.leagueoflegends.com/cdn/10.12.1/data/en_US/summoner.json";
request(spellUrl,function(error,response,body){
......