DavidGolodetsky / GeekScore

A PWA for board games fans. It allows you to store your games, create teams, and collect statistics. It's built with MEVN stack, using Vue.js 2 and Vuetify.
https://geekscore.herokuapp.com
MIT License
8 stars 33 forks source link

Create a Node.js route for calculating win rate #53

Closed DavidGolodetsky closed 4 years ago

DavidGolodetsky commented 4 years ago

Idea

Win rate is the percent of games(rounds) that you won. We would like to show win rate per game (e.g. how often do you win in Carcassonne? - 34% of played games). In Geek Score we can calculate such measurement, because games consist of teams and in every team you can find user, currently it's "Me" player (In the future Me will be replaced by username). After that we'll show win rate on Profile page, which is on the way.

Implementation Steps

Create a new route in GeekScore-2/routes/api/users.js which would fetch all games and teams then calculate win rate of the user per game, filtering it out by Me player.

Thunder80 commented 4 years ago

Can I work on this?

DavidGolodetsky commented 4 years ago

Sure thing. Ping me if you need any additional info and good luck!