python-zulip-api/contrib_bots/bots/tictactoe-bot
Abhijeet Kaur 0419848d3c contrib_bots: Restructure bots to follow a consistent structure.
Now all the bots that are stored in contrib_bots are in the
same file/directory format.
The format is specified here #3427. Add tests.py file for encrypt_bot as well.
Fixes #3427.
2017-02-10 06:44:03 -08:00
..
readme.md contrib_bots: Restructure bots to follow a consistent structure. 2017-02-10 06:44:03 -08:00
tictactoe-bot.py lint: Clean up E712 PEP-8 rule. 2017-01-23 21:11:18 -08:00

About Tic-Tac-Toe Bot

This bot allows you to play tic-tac-toe in a private message with the bot. Multiple games can simultaneously be played by different users, each playing against the computer.

The bot only responds to messages starting with @tictactoe or @ttt.

Commands

@tictactoe new (or @ttt new) will start a new game (but not if you are already playing a game.) You must type this first to start playing!

@tictactoe help (or @ttt help) will return a help function with valid commands and coordinates.

@tictactoe quit (or @ttt quit) will quit from the current game.

@tictactoe (or @ttt ) will make a move at the entered coordinate. For example, @ttt 1,1 . After this, the bot will make its move, or declare the game over if the user or bot has won.

Coordinates are entered in a (row, column) format. Numbering is from top to bottom and left to right. Here are the coordinates of each position. When entering coordinates, parentheses and spaces are optional.

(1, 1) | (1, 2) | (1, 3)

(2, 1) | (2, 2) | (2, 3)

(3, 1) | (3, 2) | (3, 3)

Invalid commands will result in an "I don't understand" response from the bot, with a suggestion to type @tictactoe help (or @ttt help).