sunnydl / GamePerformanceTracker

Team project for CSE 115A in Fall 2021, UCSC
3 stars 0 forks source link

write a function to analyze matches #38

Closed sunnydl closed 3 years ago

sunnydl commented 3 years ago

@mzhou579 The function should

Analyze the wins and losses within certain amounts of games that are given. Starting from game 1, put the win-loss ratio into a list (for example, game 1 wins, then win-loss ratio is 100%, then game 2 loss, then the win-loss ratio is 50%. Basically at each game, calculate the wins/loss up to that point, save it as a float, such as 0.55, and put it in a list)

Return the list of win rates at the end of the function.

So the input of the function will be a list of matches, then the return value will be a list of win rates

A function to fetch the matches will be given after #26 is finished by @erlyu

sunnydl commented 3 years ago

update: Function should be included in the matchService.ts in /backend/services that @erlyu has created during his issue #26