connectfour/controller: Prevent list access by negative indexing.
Currently, if a user does 'move 0', he moves to column 6(last column)
in connect_four which is unwanted behaviour and happening due to
list getting accessed through negative index (-1).
Added a check for that in controller.py file.
Fixes
MODIFY
zulip_bots/zulip_bots/bots/connect_four/connect_four.py
zulip_bots/zulip_bots/bots/connect_four/connect_four.py
@@ -47,7 +47,7 @@ class ConnectFourBotHandler(GameAdapter):
bot_name = 'connect_four'
move_help_message = '* To make your move during a game, type\n' \
'```move <column-number>``` or ```<column-number>```'
- move_regex = '(move (\d)$)|((\d)$)'
+ move_regex = '(move ([1-7])$)|(([1-7])$)'
model = ConnectFourModel
gameMessageHandler = ConnectFourMessageHandler

connectfour/controller: Prevent list access by negative indexing.

Currently, if a user does 'move 0', he moves to column 6(last column)
in connect_four which is unwanted behaviour and happening due to
list getting accessed through negative index (-1).

Added a check for that in controller.py file.

Fixes #343