made pitchers have to field outs too
This commit is contained in:
parent
7e2c275b6a
commit
e5cd6ed65d
7
games.py
7
games.py
|
@ -175,9 +175,12 @@ class game(object):
|
||||||
batter = self.get_batter()
|
batter = self.get_batter()
|
||||||
|
|
||||||
if self.top_of_inning:
|
if self.top_of_inning:
|
||||||
defender = random.choice(self.teams["home"].lineup)
|
defender_list = self.teams["home"].lineup.copy()
|
||||||
else:
|
else:
|
||||||
defender = random.choice(self.teams["away"].lineup)
|
defender_list = self.teams["away"].lineup.copy()
|
||||||
|
|
||||||
|
defender_list.append(pitcher)
|
||||||
|
defender = random.choice(defender_list) #make pitchers field
|
||||||
|
|
||||||
outcome["batter"] = batter
|
outcome["batter"] = batter
|
||||||
outcome["defender"] = ""
|
outcome["defender"] = ""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user