Bunco Simulator

Check-in [a09452]
Overview
Comment:Log team scores at each table
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a094525c3ef53cd924be69cf866a5085fd69a7ffd65007dde0f8be749a7f7628
User & Date: joel on 2018-11-22 13:20:33
Other Links: manifest | tags
Context
2018-11-22
13:24
Add function to spit out overview of game in Excel (start on [927402827e]) check-in: d20fed user: joel tags: trunk
13:20
Log team scores at each table check-in: a09452 user: joel tags: trunk
05:18
Summary texts for players after each round check-in: 562309 user: joel tags: trunk
Changes

Modified bunco.py from [f4b738] to [87116e].

358
359
360
361
362
363
364

365
366
367

368
369
370
371
372
373
374
                log(curplayer, f"{curplayer} finishing up [their] turn")
                while curplayer.current_roll:
                    table.tick()
                    self.increment_tick()
        
        # Settle ties at each table by doing a roll-off as many times as needed
        for table in self.tables:

            while table.team1_score == table.team2_score:
                log('all', f"{table} having a roll-off to resolve a tie")
                table.roll_off()

    
log_db = sqlite3.connect("bunco.sqlite")
log_dbc = log_db.cursor()

def run_query(*args):
    log_dbc.execute(*args)
    log_db.commit()







>



>







358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
                log(curplayer, f"{curplayer} finishing up [their] turn")
                while curplayer.current_roll:
                    table.tick()
                    self.increment_tick()
        
        # Settle ties at each table by doing a roll-off as many times as needed
        for table in self.tables:
            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")
    
log_db = sqlite3.connect("bunco.sqlite")
log_dbc = log_db.cursor()

def run_query(*args):
    log_dbc.execute(*args)
    log_db.commit()