Giter VIP home page Giter VIP logo

elo-slack-app's Introduction

Elo Slack App

A simple slack app that you can use to add a /elo command for your Slack team. Once added, /elo allows your team members to log games against each other for different types of games (ex. pingpong, foosball, etc) and have this app automatically keep track of everyone's Elo rating for each of the games. Provides the functionality to view your Elo rating or even see the leaderboards.

More information about the Elo rating system can be found here: https://en.wikipedia.org/wiki/Elo_rating_system

Commands:

  • /elo [@winner] defeated [@loser] at [game] logs a game for each player with @winner as the winner and changes both players Elo ratings accordingly.
  • /elo [@player1] tied [@player2] at [game] logs a tie game for each player and changes both players Elo ratings accordingly.
  • /elo leaderboard [game] displays the leaderboard for the specified game.
  • /elo rating lists your Elo rating for all types of games you've participated in.
  • /elo help shows a helpful message.

Contributing

Fork and make a PR

elo-slack-app's People

Contributors

alexinman avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

adupuis2

elo-slack-app's Issues

'Nemesis' stat for doubles

In doubles stats we should be able to see what single player we've lost to the most or have the worst record against, regardless of partners.

Refactor to separate text parsing logic from the Elo controller

I gave this a crack over the long weekend and it all looked like trash.

My cleanest approach so far was:

  • Rename ApplicationController -> BaseController
  • Make new controller ApplicationController << BaseController
  • Route all traffic through ApplicationController, where the text is parsed, and then dispatch commands from there

However, something about having a "...Controller" with no actual impact on the data feels off.

Looking for some guidance.

As a user, I want to be able to challenge other users to Elo-rated matches

Technical details:

  • A user will be able to initiate challenges by using the command
    /elo challenge @recipient_username gametype
  • ~> A message will be sent to the challenge recipient that they have been directly challenged by @sender_username, with perhaps a message saying what their Elo rating delta will be if they win/lose (@alexinman ?)
  • ~> Recipient will be able to accept or deny the challenge by using the same command:
    /elo challenge @sender_username gametype
    which will alert the challenge sender and all relevant channels (#gametype)
  • A user will be able to withdraw existing challenges by using the command
    /elo unchallenge @recipient_username gametype
  • ~> A message will be sent to the challenge recipient that the challenge has been withdrawn

Definition of done:

  • When someone uses the challenge command, we just look up existing challenges with the given details, if a challenge already exists and was initiated by a different party then accept the challenge and announce the acceptance.
  • If there is an existing challenge and the sender types the challenge command, Elo will display a short message saying that the challenge has already been initiated, with instructions on how to cancel a challenge.
  • If no such challenge exists, initiate a new challenge.

Missing footer icon

My most recent additions that added the ViewModels for the Leaderboard and Statistics broke the footer icon image URLs.

Before
Screen Shot 2019-06-12 at 2 06 54 PM
After
Screen Shot 2019-06-22 at 7 31 33 PM

Single Player games

Is there a way to use the current system to record high-scores in a single play game?
I'd like to do something like /elo @matt.cassidy scored 1054 at tetris then be able to see a high score leaderboard for the game

Public API is broken

The API now expects a slack_team_id because of the renaming of the team_id columns.

Test Suite

  • PlayerTest
  • GameTest
  • GameTypeTest
  • GameTypeViewModelTest
  • GameViewModelTest
  • LeaderboardViewModelTest
  • PlayerViewModelTest
  • CommandParserTest
  • EloControllerTest
  • GameControllerTest
  • PlayerControllerTest

The Rank feature in a User statistics is broken

The Rank that shows up when viewing an individuals stats is including doubles and singles games in the query and therefore is not properly rendering their rank and the surrounding players.

As a user, I would like to have elo recommend a random challenge for me

/elo who should @username challenge at <game> would produce a list of recommendations of people to play.

The algorithm could take into consideration people that the challenger seldom plays, greatest possible elo award, etc.

Bonus points if there are actionable slack buttons to click by each of the challenger names to invoke the challenge feature as per #1

The system should infer the game type based on channel name

if no game type is specified in the /elo [user] beat [user] command
then the system should append the string with " at channel_name" and proceed normally
where (
-> if the channel name matches a game type
-> then the command succeeds
-> else the command fails and asks the user to specify a gametype
)

Show Doubles Ranking in Statistics

Right now, if you look at the stats of a doubles team (/elo stats @Alex and @Josh) it will show the "average rating" instead of the team's rank and nearby ranks.

Add Streaks to Stats

Add the following streaks to stats if they're greater than 0:

  • Longest Winning Streak
  • Current Winning Streak
  • Longest Losing Streak
  • Current Losing Streak

As a team player I would like to know the stats for my team

I would like to see this be able to work

/elo stats <optional game> @matthew.cassidy and @alex.inman

And the stats would be filtered down to just that team

@matthew.cassidy and @alex.inman
Rank
3. @matthew.cassidy and @aaron.broad (1024)
4. @josh.northrup and @ming.wong (1023)
4. @matthew.cassidy and @alex.inman (1023)
5. @matthew.cassidy and @jamie.mcfarlane (1014)
Wins
2
Losses
0
Recent Games
• Jun 28 at 4:43 PM: Beat @mike.stewart and @brion.macdonald
• Jun 14 at 6:05 PM: Beat @mike.stewart and @brion.macdonald

4-Player Games

Add support for 4-Player games.
To calculate elo change, follow these steps:

  • 1st place player beats other 3 players
  • 2nd place player beats 3rd & 4th
  • 3rd place beats 4th place

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.