23
24
25
26
27
28
29
30
31
32
|
23
24
25
26
27
28
29
30
31
32
33
|
+
|
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
44
45
46
47
48
49
50
51
52
|
44
45
46
47
48
49
50
51
52
53
54
|
+
|
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
206
207
208
209
210
211
212
213
214
|
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
+
+
+
+
|
# 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
366
367
368
369
370
371
372
373
374
|
371
372
373
374
375
376
377
378
379
380
381
382
|
+
+
|
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):
|