diff options
| -rw-r--r-- | bot/seasons/evergreen/minesweeper.py | 18 | 
1 files changed, 7 insertions, 11 deletions
| diff --git a/bot/seasons/evergreen/minesweeper.py b/bot/seasons/evergreen/minesweeper.py index 30c871ee..f6c1d35a 100644 --- a/bot/seasons/evergreen/minesweeper.py +++ b/bot/seasons/evergreen/minesweeper.py @@ -136,20 +136,16 @@ class Minesweeper(commands.Cog):      async def lost(self, ctx: commands.Context) -> None:          """The player lost the game"""          game = self.games[ctx.author.id] -        game["revealed"] = game["board"] -        await self.reload_board(ctx) -        await ctx.author.send(":fire: You lost :fire: ") -        await game["chat_msg"].channel.send(f":fire: {ctx.author.mention} just lost Minesweeper! :fire:") -        del self.games[ctx.author.id] +        game.revealed = game.board +        await ctx.author.send(":fire: You lost! :fire: ") +        await game.chat_msg.channel.send(f":fire: {ctx.author.mention} just lost Minesweeper! :fire:")      async def won(self, ctx: commands.Context) -> None:          """The player won the game"""          game = self.games[ctx.author.id] -        game["revealed"] = game["board"] -        await self.reload_board(ctx) -        await ctx.author.send(":tada: You won! :tada: ") -        await game["chat_msg"].channel.send(f":tada: {ctx.author.mention} just won Minesweeper! :tada:") -        del self.games[ctx.author.id] +        game.revealed = game.board +        await ctx.author.send(":tada:  You won! :tada: ") +        await game.chat_msg.channel.send(f":tada: {ctx.author.mention} just won Minesweeper! :tada:")      def reveal_zeros(self, revealed: GameBoard, board: GameBoard, x: int, y: int) -> None:          """Used when a 0 is encountered to do a flood fill""" @@ -203,7 +199,7 @@ class Minesweeper(commands.Cog):          game["revealed"] = game["board"]          await self.reload_board(ctx)          await ctx.author.send(":no_entry: you canceled the game :no_entry:") -        await game["chat_msg"].channel.send(f"{ctx.author.mention} just canceled Minesweeper.") +        await game.chat_msg.channel.send(f"{ctx.author.mention} just canceled Minesweeper")          del self.games[ctx.author.id] | 
