aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/evergreen/minesweeper.py
diff options
context:
space:
mode:
authorGravatar S. Co1 <[email protected]>2019-09-11 11:33:16 -0400
committerGravatar S. Co1 <[email protected]>2019-09-11 11:33:16 -0400
commitda20c52802cbb4c68cfbb058e9ffc986b591240f (patch)
treebf38f7863925b393326edf4dc04453508e545a2b /bot/seasons/evergreen/minesweeper.py
parentMerge branch 'master' into flake8-annotations (diff)
Fix incorrect merge conflict resolutions, lint remaining items
Diffstat (limited to 'bot/seasons/evergreen/minesweeper.py')
-rw-r--r--bot/seasons/evergreen/minesweeper.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/seasons/evergreen/minesweeper.py b/bot/seasons/evergreen/minesweeper.py
index 015b09df..b0ba8145 100644
--- a/bot/seasons/evergreen/minesweeper.py
+++ b/bot/seasons/evergreen/minesweeper.py
@@ -33,7 +33,7 @@ class CoordinateConverter(commands.Converter):
"""Converter for Coordinates."""
async def convert(self, ctx: commands.Context, coordinate: str) -> typing.Tuple[int, int]:
- """Take in a coordinate string and turn it into x, y"""
+ """Take in a coordinate string and turn it into an (x, y) tuple."""
if not 2 <= len(coordinate) <= 3:
raise commands.BadArgument('Invalid co-ordinate provided')
@@ -81,7 +81,7 @@ class Minesweeper(commands.Cog):
@commands.group(name='minesweeper', aliases=('ms',), invoke_without_command=True)
async def minesweeper_group(self, ctx: commands.Context) -> None:
- """Commands for Playing Minesweeper"""
+ """Commands for Playing Minesweeper."""
await ctx.send_help(ctx.command)
@staticmethod
@@ -216,7 +216,7 @@ class Minesweeper(commands.Cog):
self.reveal_zeros(revealed, board, x_, y_)
async def check_if_won(self, ctx: commands.Context, revealed: GameBoard, board: GameBoard) -> bool:
- """Checks if a player has won"""
+ """Checks if a player has won."""
if any(
revealed[y][x] in ["hidden", "flag"] and board[y][x] != "bomb"
for x in range(10)
@@ -268,7 +268,7 @@ class Minesweeper(commands.Cog):
@minesweeper_group.command(name="end")
async def end_command(self, ctx: commands.Context) -> None:
- """End your current game"""
+ """End your current game."""
game = self.games[ctx.author.id]
game.revealed = game.board
await self.update_boards(ctx)