Coder Social home page Coder Social logo

slack-tic-tac-toe's Introduction

slack-tic-tac-toe

commands

/ttt challenge [user_name] - issues a ttt challege
/ttt accept - accepts a ttt challeged
/ttt play [slot_number] - numbers between (1 - 9)
/ttt drop - drops a game waiting to be accepted
/ttt status - shows board, and indicates turn information

How To Play

  1. Issue a challenge to any user in the channel e.g /ttt challenge jermaine

  2. The person being challenged, in this case jermaine, will need to accept the challenge by typing in /ttt accept

  3. Board will now be displayed along with turn information

| 1 | 2 | 3 |
|---+---+---|
| 4 | 5 | 6 |
|---+---+---|
| 7 | 8 | 9 |
  1. The board is mapped into 9 different sections, the user whose turn it is can now play by specifying which zone they want to put their piece in. For example to put a piece down on the most top left corner of the board, use /ttt play 1

  2. The game continues until the game is a draw or someone wins.

How to run server locally

  1. SET Environment variable SLACK_TEAM_TOKEN=your_team_token

  2. mvn package

  3. java -jar target/slack-tic-tac-toe-1.0-SNAPSHOT.jar

  4. endpoint @ http://localhost:8080/tictactoe

Note

you can accidentally challenge a non existent user, or the other player simply doesn't want to accept the challenge.
in this case you can use `/ttt drop` to end the challenge.

only games waiting for challenge accept can be dropped.  once the game starts, you need to either win or draw to end the game
Each channel can at most support 1 game at a time

slack-tic-tac-toe's People

Contributors

j43chan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.