-
-
Notifications
You must be signed in to change notification settings - Fork 259
Battleship Cog Causes IndexError #563
Copy link
Copy link
Closed
Labels
area: backendRelated to internal functionality and utilitiesRelated to internal functionality and utilitiesgood first issueGood for newcomersGood for newcomersstatus: approvedThe issue has received a core developer's approvalThe issue has received a core developer's approvaltype: bugSomething isn't workingSomething isn't working
Metadata
Metadata
Assignees
Labels
area: backendRelated to internal functionality and utilitiesRelated to internal functionality and utilitiesgood first issueGood for newcomersGood for newcomersstatus: approvedThe issue has received a core developer's approvalThe issue has received a core developer's approvaltype: bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
The
battleshipcog runs into an error when given lowercased input. An IndexError is caused when trying to get the matching letter from the list of letters. The bot quits the game with the error:Steps to Reproduce
a1)Expected Behaviour
The bot should be able to convert between upper and lower case.
Actual Behaviour
The bot errors out on lower case. Error:
Possible Solutions
You could try converting from lower to uppercase.
Additionally, you can add a try/except around the input section, to report invalid input and stop the bot from failing the game.
Would you like to implement a fix?
Note: For high-priority or critical bugs, fixes may be implemented by staff.