RBI Walk bugfix
This commit is contained in:
parent
9ab5d4d1a2
commit
b10543e09f
@ -1262,11 +1262,11 @@ def advance_runners(play_id: int, num_bases: int, is_error: bool = False, only_f
|
|||||||
if this_play.on_third:
|
if this_play.on_third:
|
||||||
if num_bases > 0:
|
if num_bases > 0:
|
||||||
this_play.on_third_final = 4
|
this_play.on_third_final = 4
|
||||||
this_play.rbi += 1 if is_error else 0
|
this_play.rbi += 1 if not is_error else 0
|
||||||
|
|
||||||
if num_bases > 1:
|
if num_bases > 1:
|
||||||
this_play.on_second_final = 4
|
this_play.on_second_final = 4
|
||||||
this_play.rbi += 1 if is_error else 0
|
this_play.rbi += 1 if not is_error else 0
|
||||||
elif num_bases == 1:
|
elif num_bases == 1:
|
||||||
this_play.on_second_final = 3
|
this_play.on_second_final = 3
|
||||||
else:
|
else:
|
||||||
@ -1277,7 +1277,7 @@ def advance_runners(play_id: int, num_bases: int, is_error: bool = False, only_f
|
|||||||
|
|
||||||
if num_bases > 2:
|
if num_bases > 2:
|
||||||
this_play.on_first_final = 4
|
this_play.on_first_final = 4
|
||||||
this_play.rbi += 1 if is_error else 0
|
this_play.rbi += 1 if not is_error else 0
|
||||||
elif num_bases == 2:
|
elif num_bases == 2:
|
||||||
this_play.on_first_final = 3
|
this_play.on_first_final = 3
|
||||||
elif num_bases == 1:
|
elif num_bases == 1:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user