Created
November 24, 2020 12:27
-
-
Save vinimonteiro/a8471cde569ac5c335456b5427d86701 to your computer and use it in GitHub Desktop.
Logic responsible for handling away-from-the-ball-rule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if bad_ft_shooter_with_ball >= random.randint(0,100): | |
if opp_bad_ft_pc >= random.randint(0,100): | |
points_down += 1 | |
if opp_bad_ft_pc >= random.randint(0,100): | |
points_down += 1 | |
have_ball = True | |
elif ft_rb_pc >= random.randint(0,100): | |
have_ball = True | |
else: | |
# RULE: one free throw and no option for rebound and the ball remains with winning team. | |
if opp_ft_pc >= random.randint(0,100): | |
points_down += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment