This is a rails app that implements a server for a tic-tac-toe game playable on Slack using [slash commands](api.slack.com/slash-commands)
Features:
-
Users can create a new game in any Slack channel by challenging another user (using their username).
-
A channel can have at most one game being played at a time.
-
Anyone in the channel can run a command to display the current board and list whose turn it is.
-
Users can specify their next move, which also publicly displays the board in the channel after the move with a reminder of whose turn it is.
-
Only the user whose turn it is can make the next move.
-
When a turn is taken that ends the game, the response indicates this along with who won.
Game commands:
-
/gamehelp - display different examples of commands
-
/newgame @username - challenge a user by creating a public tic-tac-toe game in the current channel
-
/move x y - make a move on the 3x3 grid
-
/deletecurrentgame - deletes the current ongoing game in the channel
-
/currentgame - display a summary of the current ongoing/complete game in the channel
Other info:
-
Uses postgres, for compatibility with Heroku