From 9fe64b85d02636741f92b51ec267aba0e898ddc3 Mon Sep 17 00:00:00 2001 From: Dhruv Thakker Date: Sat, 10 Mar 2018 15:41:00 +0530 Subject: [PATCH] tic_tac_toe : Add shorthand moves. --- zulip_bots/zulip_bots/bots/tictactoe/tictactoe.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zulip_bots/zulip_bots/bots/tictactoe/tictactoe.py b/zulip_bots/zulip_bots/bots/tictactoe/tictactoe.py index 9f9318d..4d4e61e 100644 --- a/zulip_bots/zulip_bots/bots/tictactoe/tictactoe.py +++ b/zulip_bots/zulip_bots/bots/tictactoe/tictactoe.py @@ -236,7 +236,7 @@ class TicTacToeMessageHandler(object): def game_start_message(self) -> str: return ("Welcome to tic-tac-toe!" - "To make a move, type @-mention `move `") + "To make a move, type @-mention `move ` or ``") class ticTacToeHandler(GameAdapter): @@ -258,8 +258,8 @@ class ticTacToeHandler(GameAdapter): def __init__(self) -> None: game_name = 'Tic Tac Toe' bot_name = 'tictactoe' - move_help_message = '* To move during a game, type\n`move `' - move_regex = 'move \d$' + move_help_message = '* To move during a game, type\n`move ` or ``' + move_regex = '(move (\d)$)|((\d)$)' model = TicTacToeModel gameMessageHandler = TicTacToeMessageHandler super(ticTacToeHandler, self).__init__(