diff --git a/modules/games/golfsim.py b/modules/games/golfsim.py index 214acc8..97e0250 100644 --- a/modules/games/golfsim.py +++ b/modules/games/golfsim.py @@ -326,8 +326,8 @@ def playGolf(nodeID, message, finishedHole=False, last_cmd=''): else: last_cmd = 'stroking' else: - msg += "\nYou have " + str(distance_remaining) + "yd. ⛳️" - msg += "\nClub?[D, L, M, H, G, W]🏌️" + msg += f"\nYou have " + str(distance_remaining) + "yd. ⛳️" + msg += f"\nClub?[D, L, M, H, G, W]🏌️" # save player's current game state, keep stroking @@ -371,7 +371,7 @@ def playGolf(nodeID, message, finishedHole=False, last_cmd=''): if hole not in [1, 10]: # Show player total scoring info for the round, except hole 1 and 10 - msg += "\nYou've hit a total of " + str(total_strokes) + " strokes today, for" + msg += f"\nYou've hit a total of " + str(total_strokes) + " strokes today, for" msg += getScorecardGolf(total_to_par) # Move to next hole @@ -410,6 +410,6 @@ def playGolf(nodeID, message, finishedHole=False, last_cmd=''): else: # Show player the next hole msg += playGolf(nodeID, '', True, last_cmd='new') - msg += "\n🏌️[D, L, M, H, G, W, End]🏌️" + msg += f"\n🏌️[D, L, M, H, G, W, End]🏌️" return msg diff --git a/modules/games/lemonade.py b/modules/games/lemonade.py index 1aef70b..73da20a 100644 --- a/modules/games/lemonade.py +++ b/modules/games/lemonade.py @@ -468,7 +468,7 @@ def playLemonstand(nodeID, message, celsius=False, newgame=False): msg += " N.Profit:" + locale.currency(net, grouping=True) # Display the updated inventory levels - msg += "\nRemaining" + msg += f"\nRemaining" msg += " πŸ₯€:" + str(inventory.cups) msg += " πŸ‹:" + str(inventory.lemons) msg += " 🍚:" + str(inventory.sugar) @@ -485,7 +485,7 @@ def playLemonstand(nodeID, message, celsius=False, newgame=False): pad_week = len(str(weeks.total)) pad_sale = len(str(weeks.sales)) total = 0 - msg += "\nWeeklyπŸ“Š" + msg += f"\nWeeklyπŸ“Š" for i in range(len(weeks.summary)): msg += "#" + str(weeks.current).rjust(pad_week) + ". " + str(weeks.summary[i]['sales']).rjust(pad_sale) + \ " sold x " + locale.currency(weeks.summary[i]['price'], grouping=True) + "ea. " @@ -525,7 +525,7 @@ def playLemonstand(nodeID, message, celsius=False, newgame=False): if (inventory.sugar <= 0): msg += " You ran out of sugar.🍚" else: - msg += "\nCongratulations πŸ‹πŸ‹ your sales were perfect!πŸŽ‰" + msg += f"\nCongratulations πŸ‹πŸ‹ your sales were perfect!πŸŽ‰" # Increment the score counters score.value = score.value + minnet @@ -536,27 +536,26 @@ def playLemonstand(nodeID, message, celsius=False, newgame=False): if (weeks.current == weeks.total): # end of the game success = round((score.value / score.total) * 100) - msg += "\nYou've made " + locale.currency(score.value, grouping=True) + " out of a possible " + \ + msg += f"\nYou've made " + locale.currency(score.value, grouping=True) + " out of a possible " + \ locale.currency(score.total, grouping=True) + " for a score of " + str(success) + "% " - msg += "You've sold " + str(weeks.total_sales) + " total πŸ₯€πŸ‹" + msg += f"\nYou've sold " + str(weeks.total_sales) + " total πŸ₯€πŸ‹" # check for high score high_score = getHighScoreLemon() if (inventory.cash > int(high_score['cash'])): - msg += "\nCongratulations! You've set a new high score!πŸŽ‰πŸ’°πŸ‹" + msg += f"\nCongratulations! You've set a new high score!πŸŽ‰πŸ’°πŸ‹" high_score['cash'] = inventory.cash high_score['success'] = success high_score['userID'] = nodeID with open('data/lemonstand.pkl', 'wb') as file: pickle.dump(high_score, file) - endGame(nodeID) else: # keep playing weeks.current = weeks.current + 1 - msg += f"Play another weekπŸ₯€? or (E)nd Game" + msg += f"\nPlay another weekπŸ₯€? or (E)nd Game" # set the last command to new in the inventory db for i in range(len(lemonadeTracker)): if lemonadeTracker[i]['nodeID'] == nodeID: diff --git a/modules/games/mmind.py b/modules/games/mmind.py index 5b08570..6d1d35b 100644 --- a/modules/games/mmind.py +++ b/modules/games/mmind.py @@ -234,8 +234,8 @@ def playGameMMind(diff, secret_code, turn_count, nodeID, message): mindTracker[i]['turns'] = turn_count elif won == False: msg += f"πŸ™‰Game OverπŸ™ˆ\nThe code was: {getEmojiMMind(secret_code)}" - msg += "\nYou have run out of turns.😿" - msg += "\nWould you like to play again? (N)ormal, (H)ard, or e(X)pert?" + msg += f"\nYou have run out of turns.😿" + msg += f"\nWould you like to play again? (N)ormal, (H)ard, or e(X)pert?" # reset turn count in tracker for i in range(len(mindTracker)): if mindTracker[i]['nodeID'] == nodeID: diff --git a/modules/games/videopoker.py b/modules/games/videopoker.py index 0dfec3d..f32ecd4 100644 --- a/modules/games/videopoker.py +++ b/modules/games/videopoker.py @@ -425,7 +425,7 @@ def playVideoPoker(nodeID, message): if player.bankroll < 1: player.bankroll = vpStartingCash - msg += "\nLooks πŸ’Έ like you're out of money. πŸ’³ resetting ballance 🏧" + msg += f"\nLooks πŸ’Έ like you're out of money. πŸ’³ resetting ballance 🏧" elif player.bankroll > vpTracker[i]['highScore']: vpTracker[i]['highScore'] = player.bankroll msg += " πŸŽ‰HighScore!"