Bunco Simulator

Check-in [8e8aaf]
Overview
Comment:Add more functions for texting players
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8e8aafcf94f2b267a18a0453253498bac1c2e70ad7450557281cbf0ef07ab04c
User & Date: joel on 2018-11-23 20:30:53
Other Links: manifest | tags
Context
2018-11-23
21:19
Update README Leaf check-in: f2f3cc user: joel tags: trunk
20:30
Add more functions for texting players check-in: 8e8aaf user: joel tags: trunk
20:29
Ignore archive folder check-in: d0bc5a user: joel tags: trunk
Changes

Modified bunco_app.py from [4468a7] to [b91166].

98
99
100
101
102
103
104




















105
106
107
108
109
110
111

def sms_table_move(player, wonlost, table_from, table_to):
    if player.smsnumber:
        message = f"Having {wonlost} the last round, you move from {table_from} to {table_to}."
        sms(player.smsnumber, message)

bunco.table_move_callback = sms_table_move





















def excel_sheet(title):
    wb = xlsxwriter.Workbook('bunco.xlsx')
    ws = wb.add_worksheet('Overview')
    style = {}

    col_heading = wb.add_format({'font_name': 'Back Issues BB', 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

def sms_table_move(player, wonlost, table_from, table_to):
    if player.smsnumber:
        message = f"Having {wonlost} the last round, you move from {table_from} to {table_to}."
        sms(player.smsnumber, message)

bunco.table_move_callback = sms_table_move

def sms_all_situations():
    for table in g.tables:
        for player in table.players:
            if player.smsnumber:
                sitch = table.get_player_situation(player)
                msg = f"You are sitting at {table} with {sitch['teammate']} for a teammate. " \
                    + f"{sitch['opponents'][0]} and {sitch['opponents'][1]} form the opposition."
                sms(player.smsnumber, msg)

def sms_all(message):
    if enable_sms:
        status("Sending SMS to all players…")
        for player in g.players:
            if player.smsnumber:
                sms(player.smsnumber, message)
    else:
        status("SMS messaging is disabled!")

display_dashboard()

def excel_sheet(title):
    wb = xlsxwriter.Workbook('bunco.xlsx')
    ws = wb.add_worksheet('Overview')
    style = {}

    col_heading = wb.add_format({'font_name': 'Back Issues BB',