Removed weather counts as they are not used
This commit is contained in:
parent
6ebea65a93
commit
4cf5e48910
10
games.py
10
games.py
|
@ -246,10 +246,8 @@ class game(object):
|
||||||
def get_batter(self):
|
def get_batter(self):
|
||||||
if self.top_of_inning:
|
if self.top_of_inning:
|
||||||
bat_team = self.teams["away"]
|
bat_team = self.teams["away"]
|
||||||
counter = self.weather.counter_away
|
|
||||||
else:
|
else:
|
||||||
bat_team = self.teams["home"]
|
bat_team = self.teams["home"]
|
||||||
counter = self.weather.counter_home
|
|
||||||
|
|
||||||
if self.weather.name == "Heavy Snow" and counter == bat_team.lineup_position:
|
if self.weather.name == "Heavy Snow" and counter == bat_team.lineup_position:
|
||||||
return bat_team.pitcher
|
return bat_team.pitcher
|
||||||
|
@ -586,11 +584,9 @@ class game(object):
|
||||||
result = self.at_bat()
|
result = self.at_bat()
|
||||||
if self.top_of_inning:
|
if self.top_of_inning:
|
||||||
offense_team = self.teams["away"]
|
offense_team = self.teams["away"]
|
||||||
weather_count = self.weather.counter_away
|
|
||||||
defense_team = self.teams["home"]
|
defense_team = self.teams["home"]
|
||||||
else:
|
else:
|
||||||
offense_team = self.teams["home"]
|
offense_team = self.teams["home"]
|
||||||
weather_count = self.weather.counter_home
|
|
||||||
defense_team = self.teams["away"]
|
defense_team = self.teams["away"]
|
||||||
|
|
||||||
if self.weather.name == "Slight Tailwind" and "mulligan" not in self.last_update[0].keys() and not result["ishit"] and result["text"] != appearance_outcomes.walk:
|
if self.weather.name == "Slight Tailwind" and "mulligan" not in self.last_update[0].keys() and not result["ishit"] and result["text"] != appearance_outcomes.walk:
|
||||||
|
@ -693,12 +689,8 @@ class game(object):
|
||||||
for base in self.bases.keys():
|
for base in self.bases.keys():
|
||||||
self.bases[base] = None
|
self.bases[base] = None
|
||||||
self.outs = 0
|
self.outs = 0
|
||||||
if self.top_of_inning and self.weather.name == "Heavy Snow" and self.weather.counter_away < self.teams["away"].lineup_position:
|
|
||||||
self.weather.counter_away = self.pitcher_insert(self.teams["away"])
|
|
||||||
|
|
||||||
if not self.top_of_inning:
|
if not self.top_of_inning:
|
||||||
if self.weather.name == "Heavy Snow" and self.weather.counter_home < self.teams["home"].lineup_position:
|
|
||||||
self.weather.counter_home = self.pitcher_insert(self.teams["home"])
|
|
||||||
self.inning += 1
|
self.inning += 1
|
||||||
if self.inning > self.max_innings and self.teams["home"].score != self.teams["away"].score: #game over
|
if self.inning > self.max_innings and self.teams["home"].score != self.teams["away"].score: #game over
|
||||||
self.over = True
|
self.over = True
|
||||||
|
@ -901,8 +893,6 @@ class weather(object):
|
||||||
def __init__(self, new_name, new_emoji):
|
def __init__(self, new_name, new_emoji):
|
||||||
self.name = new_name
|
self.name = new_name
|
||||||
self.emoji = new_emoji
|
self.emoji = new_emoji
|
||||||
self.counter_away = 0
|
|
||||||
self.counter_home = 0
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{self.emoji} {self.name}"
|
return f"{self.emoji} {self.name}"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user