Bug fix for display on blackjack
Showing
3 changed files
with
8 additions
and
7 deletions
... | @@ -117,11 +117,11 @@ class Blackjack: | ... | @@ -117,11 +117,11 @@ class Blackjack: |
117 | elif self.dealer_hand.is_blackjack(): | 117 | elif self.dealer_hand.is_blackjack(): |
118 | return (0, 'You lose. Total Winnings: {}') | 118 | return (0, 'You lose. Total Winnings: {}') |
119 | elif self.player_points > self.dealer_points: | 119 | elif self.player_points > self.dealer_points: |
120 | return (int(self.bet * 2), 'You win! Total Winnings {}') | 120 | return (int(self.bet * 2), 'You win! Total Winnings: {}') |
121 | elif self.player_points == self.dealer_points: | 121 | elif self.player_points == self.dealer_points: |
122 | return (self.bet, 'push your bet is returned: {}') | 122 | return (self.bet, 'push your bet is returned: {}') |
123 | else: | 123 | else: |
124 | return (0, 'You lose: {}') | 124 | return (0, 'You lose. Total Winnings: {}') |
125 | 125 | ||
126 | def print_hand(self, show_dealer=False): | 126 | def print_hand(self, show_dealer=False): |
127 | out_string = "" | 127 | out_string = "" | ... | ... |
No preview for this file type
... | @@ -6,6 +6,7 @@ import datetime | ... | @@ -6,6 +6,7 @@ import datetime |
6 | import re | 6 | import re |
7 | import operator | 7 | import operator |
8 | import pickle | 8 | import pickle |
9 | import logging | ||
9 | 10 | ||
10 | import traceback | 11 | import traceback |
11 | import sys | 12 | import sys |
... | @@ -38,14 +39,14 @@ muted_until = datetime.datetime.now() | ... | @@ -38,14 +39,14 @@ muted_until = datetime.datetime.now() |
38 | 39 | ||
39 | client = discord.Client() | 40 | client = discord.Client() |
40 | wolf = {} | 41 | wolf = {} |
41 | 42 | logging.basicConfig(filename='hellsbot.log',level=logging.WARNING) | |
42 | 43 | ||
43 | ##################### | 44 | ##################### |
44 | ## Utility Functions | 45 | ## Utility Functions |
45 | ##################### | 46 | ##################### |
46 | 47 | ||
47 | def log(message): | 48 | def log(message): |
48 | print("{} - {}".format(datetime.datetime.now().strftime('%Y/%m/%d %H:%M:%S'), message)) | 49 | logging.warning("{} - {}".format(datetime.datetime.now().strftime('%Y/%m/%d %H:%M:%S'), message)) |
49 | 50 | ||
50 | def format_exception(e): | 51 | def format_exception(e): |
51 | exception_list = traceback.format_stack() | 52 | exception_list = traceback.format_stack() |
... | @@ -674,11 +675,11 @@ Stuff: | ... | @@ -674,11 +675,11 @@ Stuff: |
674 | if message.content.startswith('!raffle'): | 675 | if message.content.startswith('!raffle'): |
675 | client.send_message(message.channel, """Current Raffle Item: | 676 | client.send_message(message.channel, """Current Raffle Item: |
676 | 677 | ||
677 | Game: The Witness | 678 | Game: **The Witness** |
678 | Description: | 679 | Description: |
679 | Inspired by Myst, The Witness has the player explore an open world island filled with a number of natural and man-made structures. The player progresses by solving puzzles which are based on interactions with mazes presented on panels around the island. | 680 | *Inspired by Myst, The Witness has the player explore an open world island filled with a number of natural and man-made structures. The player progresses by solving puzzles which are based on interactions with mazes presented on panels around the island.* |
680 | 681 | ||
681 | Raffle Date: 1/29/2016 | 682 | Raffle Date: **1/29/2016** |
682 | 683 | ||
683 | You will be contacted if you win. To win you must purchase tickets with the !buyticket command for 100 credits. | 684 | You will be contacted if you win. To win you must purchase tickets with the !buyticket command for 100 credits. |
684 | You can get extra credits by playing !slots and !bet <amount> on BlackJack. | 685 | You can get extra credits by playing !slots and !bet <amount> on BlackJack. | ... | ... |
-
Please register or sign in to post a comment