@@ -23,10 +23,11 @@ self.max_streak = 0 self.round_bunco_counts = [0] self.round_scores = [0] self.round_roll_counts = [0] self.personal_roll_scores = [0] + self.round_wins = [0] self.turn_progress = 0 self.current_streak = 0 self.max_fuzzydie_streak = 0 self.current_fuzzydie_streak = 0 self.rolled_bunco = False @@ -43,10 +44,11 @@ def prep_new_round(self): self.round_scores.append(0) self.round_roll_counts.append(0) self.personal_roll_scores.append(0) self.round_bunco_counts.append(0) + self.round_wins.append(0) self.turn_progress = 0 self.current_streak = 0 def score_last_roll(self): desired_num = Game.current_round() % 6 @@ -205,10 +207,14 @@ # Player 2 move to spot 3 self.players[3] = self.players[2] # Replace middle two players self.players[1:3] = new_players return losers + + def notch_wins(self): + for player in self.winners(): + player.round_wins[Game.current_round() - 1] = 1 def prep_new_round(self): self.team1_score = 0 self.team2_score = 0 self.active_player = -1 @@ -365,10 +371,12 @@ log('all', f"{table}: Team 1 {table.team1_score} pts, Team 2 {table.team2_score} pts") while table.team1_score == table.team2_score: log('all', f"{table} having a roll-off to resolve a tie") table.roll_off() log('all', f"{table}: Team 1 {table.team1_score} pts, Team 2 {table.team2_score} pts") + + table.notch_wins() log_db = sqlite3.connect("bunco.sqlite") log_dbc = log_db.cursor() def run_query(*args):