정주희

볼넷 수정

...@@ -167,7 +167,7 @@ function pre_algorithm(){//algorithm(hitter_list1, hitter_list2, pitcher1, pitch ...@@ -167,7 +167,7 @@ function pre_algorithm(){//algorithm(hitter_list1, hitter_list2, pitcher1, pitch
167 167
168 168
169 else if( pitcher[2] < num && (num <= pitcher[2] +pitcher[1]*0.01)){//볼넷 169 else if( pitcher[2] < num && (num <= pitcher[2] +pitcher[1]*0.01)){//볼넷
170 - if(base1==1 && base2==1 && base3==1){ 170 + if(base1==1 && base2==1 && base3==1){//만루 밀어내기 득점 -> 스코어 ++
171 if(home_away==1){ 171 if(home_away==1){
172 score1++; 172 score1++;
173 } 173 }
...@@ -175,8 +175,12 @@ function pre_algorithm(){//algorithm(hitter_list1, hitter_list2, pitcher1, pitch ...@@ -175,8 +175,12 @@ function pre_algorithm(){//algorithm(hitter_list1, hitter_list2, pitcher1, pitch
175 score2++; 175 score2++;
176 } 176 }
177 } 177 }
178 - else{ 178 + else{//스코어 추가되지 않는 경우
179 - if((base2==1 && base1==0 )||(base3==1 && base1==0)){ 179 + if((base2==1 && base1==0 )||(base3==1 && base1==0)||(base2==1&&base3==1&&base1==0)){//2루만 채워져있거나 3루만 채워져있거나 2,3루만 채워져있거나
180 + base1=1;
181 + }
182 + else if(base1==1 && base3==1 && base2==0){//1루 3루 채워져있고 2루 비워져있거나
183 + base2=base1;
180 base1=1; 184 base1=1;
181 } 185 }
182 else{ 186 else{
......