정훈용

ending

......@@ -26,5 +26,5 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.code.gson:gson:2.8.5'
//implementation 'com.google.code.gson:gson:2.8.5'
}
......
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 {
//gameDuration / tier 보정 값 계산 /
//이게 매치 정보이다.
//당연하게도 승리 여부를 받아온다.
boolean wins;
public void setWins(boolean aa){
wins = aa;
}
int gameId;
int myid; //게임 마다 정해지는 id 1~9 유저를 정한다.
......@@ -14,10 +21,16 @@ public class Match_info {
int queue; // 게임의 종류이다. 이는 기본 match 정보에도 있다!! 420 솔랭 / 430 일반
// 일반 유저는 일겜도 받아온다. 평가자들은 솔랭도 받아와야 한다.
//기본적으로 받아오는 시간
int gameDuration; // 이게 300 이하이면 중단 된 게임, 그냥 제외시켜 버려라!!
int gameDuration = 0; // 이게 300 이하이면 중단 된 게임, 그냥 제외시켜 버려라!!
public void setGameDuration(int nn)
{
gameDuration = nn;
}
int timePenalty1; //시간 값 받아올 때 산출한다.
int timePenalty2; // 후반 지표를 위해 큰 배수 적용
int lane = 0 ; // 0탑 1정글 2미드 3봇 4서폿
int tierN = 0;
//String role = " "; // 서폿 구분 전용이다. DUO_SUPPORT 이면 서포터로 분류
int tierH = 50;
......@@ -40,6 +53,8 @@ public class Match_info {
int wardsKilled ;
int visionWardsBoughtInGame ;
//성장 관련---------------------
int champLevel;
int goldEarned;
......@@ -55,6 +70,26 @@ public class Match_info {
int kills;
int deaths;
int assists;
int allkills = 0;
int killrelated = 0;
//자기 id를 기준으로 0~4 또는 5~9의 kills를 모두 더한다. 이걸로 킬관여 구해야지..
public void setAllkills(int aa){
allkills = allkills + aa;
}
public void calckillrelated(){
int a = 0;
float d = 0;
int b = kills + assists;
int c = allkills;
if (c > 0){
d = b / c;
d = d * 100;
a = (int)d;
}
killrelated = a;
}
boolean firstBloodAssist;
boolean firstBloodkill;
......@@ -93,6 +128,39 @@ public class Match_info {
// 챌30 그마29 마28 다27 플26 골25 실24 브23 아22 언랭22(실제 낮은 값)
// 9 ~ 0
//위에 킬관여는 있으니 분당 CS, 분당 골드도 만들어두자.
int min_gold = 0;
int min_cs = 0;
//그냥 점수도 가져다 둔다.
int finalsocre_sight = 0;
int finalscore_growth = 0;
int finalscore_act = 0;
int finalsocre_battle = 0;
//보정 하지 않은 값도 가져다 둔다.
int finalsocre_sight2 = 0;
int finalscore_growth2 = 0;
int finalscore_act2 = 0;
int finalsocre_battle2 = 0;
public void set_min_gold(){
int aa = gameDuration;
float bb = aa / 60;
aa = (int)bb;
bb = goldEarned / aa;
aa = (int)bb;
min_gold = aa;
}
public void set_min_cs(){
int aa = gameDuration;
float bb = aa / 60;
aa = (int)bb;
bb = totalMinionKilled / aa;
aa = (int)bb;
min_cs = aa;
}
public void setTierH(int tt){
switch(tt){
case 0:
......@@ -246,6 +314,9 @@ public class Match_info {
imp = 0;
}
imp = (int) imp / timePenalty1;
//finalsocre_sight = imp;
return imp;
}
......@@ -267,6 +338,9 @@ public class Match_info {
imp = 0;
}
imp = (int) imp / timePenalty1;
//finalscore_growth = imp;
return imp;
}
......@@ -349,6 +423,9 @@ public class Match_info {
imp = 0;
}
imp = (int) imp / timePenalty2;
//finalscore_act = imp;
return imp;
}
......@@ -390,6 +467,9 @@ public class Match_info {
imp = 0;
}
imp = (int) imp / timePenalty2;
//finalsocre_battle = imp;
return imp;
}
......@@ -440,4 +520,28 @@ public class Match_info {
public void setDamageSelfMitigated(int nn){damageSelfMitigated = nn;}
public void setTotalDamageTaken(int nn){totalDamageTaken = nn;}
//작성한 함수를 모두 실행한다. 값을 받아온 다음 꼭 수행시켜 줘라.
//4대 점수는 타입값에 의해 바뀔 수 있으니 주의해라!
public void callAll(int infoL, int infoT){
set_min_gold();
set_min_cs();
setTierH(infoT);
setTierL(infoL);
calckillrelated();
timePenalty1 = Penalty1(gameDuration);
timePenalty2 = Penalty2(gameDuration);
finalsocre_sight = sightscore(1,infoL);
finalsocre_sight2 = sightscore(0,infoL);
finalscore_growth = growthscore(1);
finalscore_growth2 = growthscore(0);
finalscore_act = actscore(1, infoL);
finalscore_act2 = actscore(0, infoL);
finalsocre_battle = battlecontribution(1,infoL);
finalsocre_battle2 = battlecontribution(0,infoL);
}
}
......
......@@ -168,11 +168,11 @@ public class Player_info {
return Lane[addit];
}
public void setLane(String nn, int ad){
if (nn == "TOP"){Lane[ad] = 0;}
else if (nn == "JUNGLE"){Lane[ad] = 1;}
else if (nn == "MIDDLE"){Lane[ad] = 2;}
else if (nn == "BOTTOM"){Lane[ad] = 3;}
else if (nn == "SUPPORTER"){Lane[ad] = 4;}
if (nn.equals( "TOP")){Lane[ad] = 0;}
else if (nn.equals("JUNGLE")){Lane[ad] = 1;}
else if (nn.equals("MID")){Lane[ad] = 2;}
else if (nn.equals("BOTTOM")){Lane[ad] = 3;}
else if (nn.equals( "SUPPORTER")){Lane[ad] = 4;}
else {Lane[ad] = 99;}
}
......
......@@ -60,6 +60,23 @@
<item name = "android:textSize">20sp</item>
</style>
<style name="mine_set_txt_gametype_before">
<item name = "android:layout_width">80dp</item>
<item name = "android:layout_height">40dp</item>
<item name = "android:layout_gravity">right</item>
<item name = "android:gravity">center_horizontal|center_vertical</item>
<item name = "android:text">솔랭</item>
<item name = "android:textSize">28sp</item>
</style>
<style name="mine_set_txt_gameline_before">
<item name = "android:layout_width">80dp</item>
<item name = "android:layout_height">30dp</item>
<item name = "android:layout_gravity">bottom|right</item>
<item name = "android:gravity">center_horizontal|center_vertical</item>
<item name = "android:text">미드</item>
<item name = "android:textSize">20sp</item>
</style>
<style name="pro_set_img_tier">
<item name = "android:layout_width">83dp</item>
......@@ -87,7 +104,7 @@
<item name = "android:layout_width">217dp</item>
<item name = "android:layout_height">wrap_content</item>
<item name = "android:layout_gravity">bottom|center</item>
<item name = "android:text">아이언 l 0포인트</item>
<item name = "android:text">챌린저 1200점</item>
<item name = "android:textSize">20sp</item>
</style>
......@@ -95,7 +112,7 @@
<item name = "android:layout_width">234dp</item>
<item name = "android:layout_height">wrap_content</item>
<item name = "android:layout_gravity">center|top</item>
<item name = "android:text">김깡통</item>
<item name = "android:text">PRO1</item>
<item name = "android:textSize">30sp</item>
</style>
......