aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar aruna2019 <[email protected]>2021-01-21 01:13:52 +0530
committerGravatar xithrius <[email protected]>2021-01-21 10:09:04 -0800
commitc654f693eda0db6b12e8bafa6ef0354ca4f43245 (patch)
tree9795e4c293c2766ad6afca418567021d1a6c45b0
parentMerge pull request #509 from Vthechamp22/master (diff)
Fixed battleship reading uppercases incorrectly.
-rw-r--r--bot/exts/evergreen/battleship.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/evergreen/battleship.py b/bot/exts/evergreen/battleship.py
index 9bc374e6..fa3fb35c 100644
--- a/bot/exts/evergreen/battleship.py
+++ b/bot/exts/evergreen/battleship.py
@@ -140,7 +140,7 @@ class Game:
@staticmethod
def get_square(grid: Grid, square: str) -> Square:
"""Grabs a square from a grid with an inputted key."""
- index = ord(square[0]) - ord("A")
+ index = ord(square[0].upper()) - ord("A")
number = int(square[1:])
return grid[number-1][index] # -1 since lists are indexed from 0