From 5c63ff600c454434c1c5e70713cf0b7376d2d1b4 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Tue, 29 Dec 2020 00:02:22 -0500 Subject: [PATCH 1/2] edited gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3ce9b2f..1722461 100644 --- a/.gitignore +++ b/.gitignore @@ -346,4 +346,5 @@ weather_config.json ids # database -matteo.db \ No newline at end of file +matteo.db +/matteo_env/Lib/site-packages/flask_socketio/__init__.py From e5cd6ed65dcc80050fcd9d0f1e660abe1bcc6f8a Mon Sep 17 00:00:00 2001 From: Sakimori Date: Tue, 29 Dec 2020 20:25:41 -0500 Subject: [PATCH 2/2] made pitchers have to field outs too --- games.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/games.py b/games.py index 2a75145..c692aa2 100644 --- a/games.py +++ b/games.py @@ -175,9 +175,12 @@ class game(object): batter = self.get_batter() if self.top_of_inning: - defender = random.choice(self.teams["home"].lineup) + defender_list = self.teams["home"].lineup.copy() 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["defender"] = ""