aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/evergreen/minesweeper.py
diff options
context:
space:
mode:
authorGravatar S. Co1 <[email protected]>2019-09-11 11:12:37 -0400
committerGravatar S. Co1 <[email protected]>2019-09-11 11:12:37 -0400
commita6a1939dc9917f59ee75f138757a2e4ab48742d1 (patch)
tree0673794db3c19d661cd8dd39141772c4d7140460 /bot/seasons/evergreen/minesweeper.py
parentLint remaining files (diff)
parentMerge pull request #269 from python-discord/hacktoberfest-update (diff)
Merge branch 'master' into flake8-annotations
Diffstat (limited to 'bot/seasons/evergreen/minesweeper.py')
-rw-r--r--bot/seasons/evergreen/minesweeper.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/seasons/evergreen/minesweeper.py b/bot/seasons/evergreen/minesweeper.py
index 9dadb9f0..015b09df 100644
--- a/bot/seasons/evergreen/minesweeper.py
+++ b/bot/seasons/evergreen/minesweeper.py
@@ -175,7 +175,7 @@ class Minesweeper(commands.Cog):
@commands.dm_only()
@minesweeper_group.command(name="flag")
async def flag_command(self, ctx: commands.Context, *coordinates: CoordinateConverter) -> None:
- """Place multiple flags on the board"""
+ """Place multiple flags on the board."""
board: GameBoard = self.games[ctx.author.id].revealed
for x, y in coordinates:
if board[y][x] == "hidden":
@@ -185,14 +185,14 @@ class Minesweeper(commands.Cog):
@staticmethod
def reveal_bombs(revealed: GameBoard, board: GameBoard) -> None:
- """Reveals all the bombs"""
+ """Reveals all the bombs."""
for y, row in enumerate(board):
for x, cell in enumerate(row):
if cell == "bomb":
revealed[y][x] = cell
async def lost(self, ctx: commands.Context) -> None:
- """The player lost the game"""
+ """The player lost the game."""
game = self.games[ctx.author.id]
self.reveal_bombs(game.revealed, game.board)
await ctx.author.send(":fire: You lost! :fire:")
@@ -200,7 +200,7 @@ class Minesweeper(commands.Cog):
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"""
+ """The player won the game."""
game = self.games[ctx.author.id]
await ctx.author.send(":tada: You won! :tada:")
if game.activated_on_server:
@@ -252,7 +252,7 @@ class Minesweeper(commands.Cog):
@commands.dm_only()
@minesweeper_group.command(name="reveal")
async def reveal_command(self, ctx: commands.Context, *coordinates: CoordinateConverter) -> None:
- """Reveal multiple cells"""
+ """Reveal multiple cells."""
game = self.games[ctx.author.id]
revealed: GameBoard = game.revealed
board: GameBoard = game.board