Giter Site home page Giter Site logo

slack_game_app's Introduction

##Slack - Clash Royale Game APP

This is a beta of a clash royale slack game to be played with your team on slack. You and your buds enter the arena and fight each other until the end of the rounds or until there is only one player left. Each round, players can use one of the following comands.

Here are the functions avaliable

  1. Attack - Find and atack other players (if you dont't fail)

  2. Heal - Recover 30 points of life (if you don't fail)

  3. Look for weapon - Ramdomly search for a weapon (Normal weapons and Rare weapons)

  4. Hide - Hide from other players for 1 round.

  5. Enter Arena - Look for a open Arena

  6. (admin) Start Arena - Define the duration of the round and how many rounds the arena will have and start it

leeroy jenkins!!! Attack!!! Search for a random weapon

How to install

  1. Create, configure app and activate a income webhook.
  • define the name of the channel in wich the game will play on your workspace create an app on your slack account
  1. Create a ".env" file with the following variables:
  • MONGO_CONNECTION_STRING = mongoDB conection String
  • SLACK_CONNECTION_STRING = Create a Slack webhook URP and use here
  1. Configure Arena
  • Create a database and a Collection named arenas Create the following document: {"_id":{"$oid":"6181........0fbd"},"name":"Clash Royale Arena","status":"Active","total_players":100,"rounds":10,"round_duration":20000} . You will send the arena id as a parameter to start the arena and you can define the number of round and the round duration.
  1. Configure Weapons
  • Create a database and a Collection named weapons Create the weapons as the scheme: {"name":"Knife","slack_weapon_code":":hocho:","weapon_code":1,"min_dmg":10,"max_dmg":15,"rarity":"Normal"} . You can define the rarity of the weapon, the icon that will show in slack and the min and max damage of the weapon
  1. Define the channel name in wich you will play the game /controllers/players.js in the slack_game_params variable.

  2. Configure the commands on slack (after you hosted the app, i was using a free tier account on heroku) configure slack commands Each command will send a POST request for one of the functions of the game!

Remeber: when testing on postman, you need to send the body using urlencoded format (same as slack will use)

Thats it, you are ready to test!!!

slack_game_app's People

Contributors

rafaelyoneta avatar

Stargazers

Klaus Ferreira avatar

Watchers

 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.