Bunco Simulator

Diff

Differences From Artifact [109c1e]:

To Artifact [36d781]:


90
91
92
93
94
95
96





97
98
99
100
101
102
103
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108







+
+
+
+
+







                                 'align': 'right',
                                 'num_format': '_(* #,##0_);_(* (#,##0);_(* "-"??_);_(@_)',
                                 'color': '#0070C0'})
    total_style = wb.add_format({'font_name': 'Milk Mustache BB', 
                                 'font_size': 14,
                                 'align': 'center',
                                 'bold': 'true'})
    prizename_style = wb.add_format({'font_name': 'Milk Mustache BB', 
                                 'font_size': 14})
    prizewinner_style = wb.add_format({'font_name': 'Back Issues BB', 
                                 'font_size': 12,
                                 'color': '#E26B0A'})

    style['player_title'] = wb.add_format({'font_name': 'Back Issues BB', 
                                 'font_size': 28,
                                 'bold': True,
                                 'color': '#0096FF'})
    style['player_subtitle'] = wb.add_format({'font_name': 'Back Issues BB', 
                                 'font_size': 16})
182
183
184
185
186
187
188

189




190
191
192
193
194
195
196
187
188
189
190
191
192
193
194

195
196
197
198
199
200
201
202
203
204
205







+
-
+
+
+
+







        ws.write(row, end_col + 4, sum(player.round_bunco_counts), total_style)
        ws.write(row, end_col + 5, sum(player.round_roll_counts), total_style)

        excel_score_sheet(wb, style, player, title)

    end_row = 3 + len(g.players)
    ws.write(end_row + 1, 0, "Prizes", title_style)
    prizelist = g.prizes()
    

    for n, (prizename, winners) in enumerate(prizelist.items()):
        ws.write(end_row + 2 + n, 0, prizename, prizename_style)
        ws.write(end_row + 2 + n, 1, winners, prizewinner_style)
    wb.close()

def excel_score_sheet(workbook, styles, player, title):
    ws = workbook.add_worksheet(player.name)

    ws.set_column('A:A', 14)
    ws.set_column('B:C', 13)