정훈용

ending

...@@ -26,5 +26,5 @@ dependencies { ...@@ -26,5 +26,5 @@ dependencies {
26 testImplementation 'junit:junit:4.12' 26 testImplementation 'junit:junit:4.12'
27 androidTestImplementation 'androidx.test.ext:junit:1.1.1' 27 androidTestImplementation 'androidx.test.ext:junit:1.1.1'
28 androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 28 androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
29 - implementation 'com.google.code.gson:gson:2.8.5' 29 + //implementation 'com.google.code.gson:gson:2.8.5'
30 } 30 }
......
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
...@@ -7,6 +7,13 @@ public class Match_info { ...@@ -7,6 +7,13 @@ public class Match_info {
7 //gameDuration / tier 보정 값 계산 / 7 //gameDuration / tier 보정 값 계산 /
8 8
9 //이게 매치 정보이다. 9 //이게 매치 정보이다.
10 +
11 + //당연하게도 승리 여부를 받아온다.
12 + boolean wins;
13 + public void setWins(boolean aa){
14 + wins = aa;
15 + }
16 +
10 int gameId; 17 int gameId;
11 18
12 int myid; //게임 마다 정해지는 id 1~9 유저를 정한다. 19 int myid; //게임 마다 정해지는 id 1~9 유저를 정한다.
...@@ -14,10 +21,16 @@ public class Match_info { ...@@ -14,10 +21,16 @@ public class Match_info {
14 int queue; // 게임의 종류이다. 이는 기본 match 정보에도 있다!! 420 솔랭 / 430 일반 21 int queue; // 게임의 종류이다. 이는 기본 match 정보에도 있다!! 420 솔랭 / 430 일반
15 // 일반 유저는 일겜도 받아온다. 평가자들은 솔랭도 받아와야 한다. 22 // 일반 유저는 일겜도 받아온다. 평가자들은 솔랭도 받아와야 한다.
16 //기본적으로 받아오는 시간 23 //기본적으로 받아오는 시간
17 - int gameDuration; // 이게 300 이하이면 중단 된 게임, 그냥 제외시켜 버려라!! 24 + int gameDuration = 0; // 이게 300 이하이면 중단 된 게임, 그냥 제외시켜 버려라!!
25 + public void setGameDuration(int nn)
26 + {
27 + gameDuration = nn;
28 + }
29 +
18 int timePenalty1; //시간 값 받아올 때 산출한다. 30 int timePenalty1; //시간 값 받아올 때 산출한다.
19 int timePenalty2; // 후반 지표를 위해 큰 배수 적용 31 int timePenalty2; // 후반 지표를 위해 큰 배수 적용
20 int lane = 0 ; // 0탑 1정글 2미드 3봇 4서폿 32 int lane = 0 ; // 0탑 1정글 2미드 3봇 4서폿
33 + int tierN = 0;
21 //String role = " "; // 서폿 구분 전용이다. DUO_SUPPORT 이면 서포터로 분류 34 //String role = " "; // 서폿 구분 전용이다. DUO_SUPPORT 이면 서포터로 분류
22 35
23 int tierH = 50; 36 int tierH = 50;
...@@ -40,6 +53,8 @@ public class Match_info { ...@@ -40,6 +53,8 @@ public class Match_info {
40 int wardsKilled ; 53 int wardsKilled ;
41 int visionWardsBoughtInGame ; 54 int visionWardsBoughtInGame ;
42 55
56 +
57 +
43 //성장 관련--------------------- 58 //성장 관련---------------------
44 int champLevel; 59 int champLevel;
45 int goldEarned; 60 int goldEarned;
...@@ -55,6 +70,26 @@ public class Match_info { ...@@ -55,6 +70,26 @@ public class Match_info {
55 int kills; 70 int kills;
56 int deaths; 71 int deaths;
57 int assists; 72 int assists;
73 + int allkills = 0;
74 + int killrelated = 0;
75 +
76 + //자기 id를 기준으로 0~4 또는 5~9의 kills를 모두 더한다. 이걸로 킬관여 구해야지..
77 + public void setAllkills(int aa){
78 + allkills = allkills + aa;
79 + }
80 + public void calckillrelated(){
81 + int a = 0;
82 + float d = 0;
83 + int b = kills + assists;
84 + int c = allkills;
85 + if (c > 0){
86 + d = b / c;
87 + d = d * 100;
88 + a = (int)d;
89 + }
90 + killrelated = a;
91 +
92 + }
58 93
59 boolean firstBloodAssist; 94 boolean firstBloodAssist;
60 boolean firstBloodkill; 95 boolean firstBloodkill;
...@@ -93,6 +128,39 @@ public class Match_info { ...@@ -93,6 +128,39 @@ public class Match_info {
93 // 챌30 그마29 마28 다27 플26 골25 실24 브23 아22 언랭22(실제 낮은 값) 128 // 챌30 그마29 마28 다27 플26 골25 실24 브23 아22 언랭22(실제 낮은 값)
94 // 9 ~ 0 129 // 9 ~ 0
95 130
131 + //위에 킬관여는 있으니 분당 CS, 분당 골드도 만들어두자.
132 + int min_gold = 0;
133 + int min_cs = 0;
134 +
135 + //그냥 점수도 가져다 둔다.
136 + int finalsocre_sight = 0;
137 + int finalscore_growth = 0;
138 + int finalscore_act = 0;
139 + int finalsocre_battle = 0;
140 +
141 + //보정 하지 않은 값도 가져다 둔다.
142 + int finalsocre_sight2 = 0;
143 + int finalscore_growth2 = 0;
144 + int finalscore_act2 = 0;
145 + int finalsocre_battle2 = 0;
146 +
147 + public void set_min_gold(){
148 + int aa = gameDuration;
149 + float bb = aa / 60;
150 + aa = (int)bb;
151 + bb = goldEarned / aa;
152 + aa = (int)bb;
153 + min_gold = aa;
154 + }
155 + public void set_min_cs(){
156 + int aa = gameDuration;
157 + float bb = aa / 60;
158 + aa = (int)bb;
159 + bb = totalMinionKilled / aa;
160 + aa = (int)bb;
161 + min_cs = aa;
162 + }
163 +
96 public void setTierH(int tt){ 164 public void setTierH(int tt){
97 switch(tt){ 165 switch(tt){
98 case 0: 166 case 0:
...@@ -246,6 +314,9 @@ public class Match_info { ...@@ -246,6 +314,9 @@ public class Match_info {
246 imp = 0; 314 imp = 0;
247 } 315 }
248 imp = (int) imp / timePenalty1; 316 imp = (int) imp / timePenalty1;
317 +
318 + //finalsocre_sight = imp;
319 +
249 return imp; 320 return imp;
250 321
251 } 322 }
...@@ -267,6 +338,9 @@ public class Match_info { ...@@ -267,6 +338,9 @@ public class Match_info {
267 imp = 0; 338 imp = 0;
268 } 339 }
269 imp = (int) imp / timePenalty1; 340 imp = (int) imp / timePenalty1;
341 +
342 + //finalscore_growth = imp;
343 +
270 return imp; 344 return imp;
271 } 345 }
272 346
...@@ -349,6 +423,9 @@ public class Match_info { ...@@ -349,6 +423,9 @@ public class Match_info {
349 imp = 0; 423 imp = 0;
350 } 424 }
351 imp = (int) imp / timePenalty2; 425 imp = (int) imp / timePenalty2;
426 +
427 + //finalscore_act = imp;
428 +
352 return imp; 429 return imp;
353 } 430 }
354 431
...@@ -390,6 +467,9 @@ public class Match_info { ...@@ -390,6 +467,9 @@ public class Match_info {
390 imp = 0; 467 imp = 0;
391 } 468 }
392 imp = (int) imp / timePenalty2; 469 imp = (int) imp / timePenalty2;
470 +
471 + //finalsocre_battle = imp;
472 +
393 return imp; 473 return imp;
394 474
395 } 475 }
...@@ -440,4 +520,28 @@ public class Match_info { ...@@ -440,4 +520,28 @@ public class Match_info {
440 public void setDamageSelfMitigated(int nn){damageSelfMitigated = nn;} 520 public void setDamageSelfMitigated(int nn){damageSelfMitigated = nn;}
441 public void setTotalDamageTaken(int nn){totalDamageTaken = nn;} 521 public void setTotalDamageTaken(int nn){totalDamageTaken = nn;}
442 522
523 + //작성한 함수를 모두 실행한다. 값을 받아온 다음 꼭 수행시켜 줘라.
524 + //4대 점수는 타입값에 의해 바뀔 수 있으니 주의해라!
525 + public void callAll(int infoL, int infoT){
526 + set_min_gold();
527 + set_min_cs();
528 + setTierH(infoT);
529 + setTierL(infoL);
530 + calckillrelated();
531 + timePenalty1 = Penalty1(gameDuration);
532 + timePenalty2 = Penalty2(gameDuration);
533 +
534 + finalsocre_sight = sightscore(1,infoL);
535 + finalsocre_sight2 = sightscore(0,infoL);
536 +
537 + finalscore_growth = growthscore(1);
538 + finalscore_growth2 = growthscore(0);
539 +
540 + finalscore_act = actscore(1, infoL);
541 + finalscore_act2 = actscore(0, infoL);
542 +
543 + finalsocre_battle = battlecontribution(1,infoL);
544 + finalsocre_battle2 = battlecontribution(0,infoL);
545 + }
546 +
443 } 547 }
......
...@@ -168,11 +168,11 @@ public class Player_info { ...@@ -168,11 +168,11 @@ public class Player_info {
168 return Lane[addit]; 168 return Lane[addit];
169 } 169 }
170 public void setLane(String nn, int ad){ 170 public void setLane(String nn, int ad){
171 - if (nn == "TOP"){Lane[ad] = 0;} 171 + if (nn.equals( "TOP")){Lane[ad] = 0;}
172 - else if (nn == "JUNGLE"){Lane[ad] = 1;} 172 + else if (nn.equals("JUNGLE")){Lane[ad] = 1;}
173 - else if (nn == "MIDDLE"){Lane[ad] = 2;} 173 + else if (nn.equals("MID")){Lane[ad] = 2;}
174 - else if (nn == "BOTTOM"){Lane[ad] = 3;} 174 + else if (nn.equals("BOTTOM")){Lane[ad] = 3;}
175 - else if (nn == "SUPPORTER"){Lane[ad] = 4;} 175 + else if (nn.equals( "SUPPORTER")){Lane[ad] = 4;}
176 else {Lane[ad] = 99;} 176 else {Lane[ad] = 99;}
177 } 177 }
178 178
......
...@@ -60,6 +60,23 @@ ...@@ -60,6 +60,23 @@
60 <item name = "android:textSize">20sp</item> 60 <item name = "android:textSize">20sp</item>
61 </style> 61 </style>
62 62
63 + <style name="mine_set_txt_gametype_before">
64 + <item name = "android:layout_width">80dp</item>
65 + <item name = "android:layout_height">40dp</item>
66 + <item name = "android:layout_gravity">right</item>
67 + <item name = "android:gravity">center_horizontal|center_vertical</item>
68 + <item name = "android:text">솔랭</item>
69 + <item name = "android:textSize">28sp</item>
70 + </style>
71 +
72 + <style name="mine_set_txt_gameline_before">
73 + <item name = "android:layout_width">80dp</item>
74 + <item name = "android:layout_height">30dp</item>
75 + <item name = "android:layout_gravity">bottom|right</item>
76 + <item name = "android:gravity">center_horizontal|center_vertical</item>
77 + <item name = "android:text">미드</item>
78 + <item name = "android:textSize">20sp</item>
79 + </style>
63 80
64 <style name="pro_set_img_tier"> 81 <style name="pro_set_img_tier">
65 <item name = "android:layout_width">83dp</item> 82 <item name = "android:layout_width">83dp</item>
...@@ -87,7 +104,7 @@ ...@@ -87,7 +104,7 @@
87 <item name = "android:layout_width">217dp</item> 104 <item name = "android:layout_width">217dp</item>
88 <item name = "android:layout_height">wrap_content</item> 105 <item name = "android:layout_height">wrap_content</item>
89 <item name = "android:layout_gravity">bottom|center</item> 106 <item name = "android:layout_gravity">bottom|center</item>
90 - <item name = "android:text">아이언 l 0포인트</item> 107 + <item name = "android:text">챌린저 1200점</item>
91 <item name = "android:textSize">20sp</item> 108 <item name = "android:textSize">20sp</item>
92 </style> 109 </style>
93 110
...@@ -95,7 +112,7 @@ ...@@ -95,7 +112,7 @@
95 <item name = "android:layout_width">234dp</item> 112 <item name = "android:layout_width">234dp</item>
96 <item name = "android:layout_height">wrap_content</item> 113 <item name = "android:layout_height">wrap_content</item>
97 <item name = "android:layout_gravity">center|top</item> 114 <item name = "android:layout_gravity">center|top</item>
98 - <item name = "android:text">김깡통</item> 115 + <item name = "android:text">PRO1</item>
99 <item name = "android:textSize">30sp</item> 116 <item name = "android:textSize">30sp</item>
100 </style> 117 </style>
101 118
......