diff options
| author | 2019-08-19 12:01:30 +1000 | |
|---|---|---|
| committer | 2019-08-19 12:01:30 +1000 | |
| commit | 9b55411679a89cd4809482154940c8d49421780d (patch) | |
| tree | a8f14be8311f42f8f2007ff16e14130994c05f04 /bot | |
| parent | changed flag again. (minesweeper) (#259) (diff) | |
| parent | added suggestion. (diff) | |
fixed coordinate bug. (#256)
fixed coordinate bug.
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/seasons/evergreen/minesweeper.py | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/bot/seasons/evergreen/minesweeper.py b/bot/seasons/evergreen/minesweeper.py index f09230a9..c99cefba 100644 --- a/bot/seasons/evergreen/minesweeper.py +++ b/bot/seasons/evergreen/minesweeper.py @@ -36,7 +36,13 @@ class CoordinateConverter(commands.Converter):          if not 2 <= len(coordinate) <= 3:              raise commands.BadArgument('Invalid co-ordinate provided') -        digit, letter = sorted(coordinate.lower()) +        coordinate = coordinate.lower() +        if coordinate[0].isalpha(): +            digit = coordinate[1:] +            letter = coordinate[0] +        else: +            digit = coordinate[:-1] +            letter = coordinate[-1]          if not digit.isdigit():              raise commands.BadArgument | 
