from db_calls_gameplay import StratGame, StratPlay, StratLineup, StratManagerAi, patch_play, advance_runners, \ complete_play def single_onestar(this_play: StratPlay, comp_play: bool = True): patch_play(this_play.id, locked=True) advance_runners(this_play.id, num_bases=1) patch_play(this_play.id, pa=1, ab=1, hit=1) if comp_play: complete_play(this_play.id, batter_to_base=1) def single_wellhit(this_play: StratPlay, comp_play: bool = True): patch_play(this_play.id, locked=True) advance_runners(this_play.id, num_bases=2) patch_play(this_play.id, pa=1, ab=1, hit=1) if comp_play: complete_play(this_play.id, batter_to_base=1) def double_twostar(this_play: StratPlay, comp_play: bool = True): patch_play(this_play.id, locked=True) advance_runners(this_play.id, num_bases=2) patch_play(this_play.id, pa=1, ab=1, hit=1, double=1) if comp_play: complete_play(this_play.id, batter_to_base=2) def double_threestar(this_play: StratPlay, comp_play: bool = True): patch_play(this_play.id, locked=True) advance_runners(this_play.id, num_bases=3) patch_play(this_play.id, pa=1, ab=1, hit=1, double=1) if comp_play: complete_play(this_play.id, batter_to_base=2) def triple(this_play: StratPlay, comp_play: bool = True): patch_play(this_play.id, locked=True) advance_runners(this_play.id, num_bases=3) patch_play(this_play.id, pa=1, ab=1, hit=1, triple=1) if comp_play: complete_play(this_play.id, batter_to_base=3)