황성연

구조 수정

...@@ -155,57 +155,7 @@ module.exports = function(app){ ...@@ -155,57 +155,7 @@ module.exports = function(app){
155 155
156 156
157 } 157 }
158 - champ_name[champ_name.length] = "total"; 158 +
159 - var temp_id;
160 - var temp_name;
161 - var temp_point;
162 - var temp_pic;
163 - for(var i=0; i < champ_id.length-1; i++){
164 - for(var j=i+1;j <champ_id.length-1; j++)
165 - if(champ_point[i] > champ_point[j]){
166 - temp_id = champ_id[i];
167 - temp_name = champ_name[i];
168 - temp_point = champ_point[i];
169 - temp_pic = champ_pic[i];
170 - champ_id[i] = champ_id[j]
171 - champ_name[i] = champ_name[j];
172 - champ_point[i] = champ_point[j];
173 - champ_pic[i] = champ_pic[j];
174 - champ_id[j] = temp_id
175 - champ_name[j] = temp_name;
176 - champ_point[j] = temp_point;
177 - champ_pic[j] = temp_pic;
178 - }
179 - }
180 - const defaultMMR = [
181 - {"mmr" : 900, "tier" : "iron", "rank": 4},
182 - {"mmr" : 950, "tier" : "iron", "rank": 3},
183 - {"mmr" : 1000, "tier" : "iron", "rank": 2},
184 - {"mmr" : 1050, "tier" : "iron", "rank": 1},
185 - { "mmr" : 1100, "tier" : "bronze", "rank": 4 },
186 - { "mmr" : 1150, "tier" : "bronze", "rank": 3 },
187 - { "mmr" : 1200, "tier" : "bronze", "rank": 2 },
188 - { "mmr" : 1250, "tier" : "bronze", "rank": 1 },
189 - { "mmr" : 1300, "tier" : "silver", "rank": 4 },
190 - { "mmr" : 1350, "tier" : "silver", "rank": 3 },
191 - { "mmr" : 1400, "tier" : "silver", "rank": 2 },
192 - { "mmr" : 1450, "tier" : "silver", "rank": 1 },
193 - { "mmr" : 1500, "tier" : "gold", "rank": 4 },
194 - { "mmr" : 1550, "tier" : "gold", "rank": 3 },
195 - { "mmr" : 1600, "tier" : "gold", "rank": 2 },
196 - { "mmr" : 1650, "tier" : "gold", "rank": 1 },
197 - { "mmr" : 1700, "tier" : "platinum", "rank": 4 },
198 - { "mmr" : 1750, "tier" : "platinum", "rank": 3 },
199 - { "mmr" : 1800, "tier" : "platinum", "rank": 2 },
200 - { "mmr" : 1850, "tier" : "platinum", "rank": 1 },
201 - { "mmr" : 1900, "tier" : "diamond", "rank": 4 },
202 - { "mmr" : 1950, "tier" : "diamond", "rank": 3 },
203 - { "mmr" : 2000, "tier" : "diamond", "rank": 2 },
204 - { "mmr" : 2050, "tier" : "diamond", "rank": 1 },
205 - { "mmr" : 2100, "tier" : "master", "rank": 1 },
206 - { "mmr" : 2700, "tier" : "challenger", "rank": 1 },
207 - ]
208 -
209 var spellUrl = "http://ddragon.leagueoflegends.com/cdn/10.12.1/data/en_US/summoner.json"; 159 var spellUrl = "http://ddragon.leagueoflegends.com/cdn/10.12.1/data/en_US/summoner.json";
210 request(spellUrl,function(error,response,body){ 160 request(spellUrl,function(error,response,body){
211 var spell = (JSON.parse(body)).data; 161 var spell = (JSON.parse(body)).data;
......