Exemple #1
0
 async def announce_start(self) -> None:
     starting_message = LINEBREAK.join([
         ':bomb: Welcome to Bombtile! :bomb:',
         self.renderer.get_grid(),
         'Players take turns flipping tiles. Whoever gets the bomb `<!>` loses!'
     ])
     await self.bombtile.ctx.send(starting_message)
Exemple #2
0
 def _get_end_report(self) -> str:
     chosen_sum = self.hammerpot.chosen_sum
     payout = self.hammerpot.payout
     return LINEBREAK.join([
         f"Your sum is {chosen_sum}!",
         f":hammer: Payout is {payout} gold. :hammer:"
     ])
Exemple #3
0
 def get_starting_message(self):
     num_attempts = self.hammerpot.attempts_remaining
     numbers = self.hammerpot.num_columns * self.hammerpot.num_columns
     return LINEBREAK.join([
         f":hammer: Welcome to Hammerpot! :hammer:",
         self.renderer.get_grid(),
         f"This card contains unique numbers from 1 to {numbers}.",
         f"1. Reveal {num_attempts} tiles with `/scratch`",
         "2. Then `/pick` a line (row, column, or diagonal)",
         "The sum of the numbers across your selected line matches a payout in the chart!"
     ])
Exemple #4
0
 def get_card(self):
     host = self.hammerpot.host_name
     return LINEBREAK.join([
         f":hammer: {host}'s Hammerpot :hammer:",
         self.renderer.get_grid()
     ])
Exemple #5
0
 def wrap_statistics(stats_list: str) -> str:
     return LINEBREAK.join([CODE_TAG, stats_list, CODE_TAG])
Exemple #6
0
 def get_losses(self, user) -> str or None:
     losses = self.__get_formatted_losses(user)
     if len(losses) > 0:
         losses.insert(0, f"{user.display_name} lost to")
         return LINEBREAK.join(losses)
Exemple #7
0
 def get_winnings(self, user) -> str or None:
     gold_stats = self.__get_formatted_winnings(user)
     if len(gold_stats) > 0:
         gold_stats.insert(0, f"{user.display_name} won from")
         return LINEBREAK.join(gold_stats)
Exemple #8
0
 def get_totals(self, user) -> str or None:
     gold_stats = self.__get_formatted_totals(user)
     if len(gold_stats) > 0:
         gold_stats.insert(0, f"{user.display_name}'s stats")
         return LINEBREAK.join(gold_stats)