FightForSub / FFS-Api

Fight For Subs API
https://ffs-events.zerator.com/
GNU General Public License v3.0
16 stars 7 forks source link

Set the player's rank when the event is set to "Finished". #23

Closed AlexMog closed 5 years ago

vdumestre commented 5 years ago

Hi, i would like to work on this enhancement but i have some question : For the ranking type, SCORE_ASC mean the less points you have, the better you are ?

Also is this ok to detected if ranking players is needed in Event Ressource? if (entity.status == EventBean.Status.ENDED && bean.getStatus() != EventBean.Status.ENDED) rankAllUsers(mEventId); (the event is now ENDED but wasn't before)

Hartorn commented 5 years ago

Hi @vdumestre For the ranking, with SCORE_ASC, yeah it means that. You have to handle an exception though : a zero score means the user did not play the round.

For the event resource, I would say so, but @AlexMog will confirm that.

To discuss more easily, you can join the slack.

Also, to be able to develop more easily, you can use this repo with docker for FFS https://github.com/FightForSub/ffs-docker

vdumestre commented 5 years ago

Ok thanks, what to do if an user didn't play a round ? don't rank him ?

And what the slack link please ?

Hartorn commented 5 years ago

For the slack: https://ffs-events-zerator.slack.com/

If he did not play the round, then he must be ranked last. On the ranking page, what we do is a bit ugly, but basically, if SCORE_ASC and score = 0 , then we use 0 as 1000. For SCORE_DESC, 0=-1000

That way, player who did not play all the rounds are at the end.

vdumestre commented 5 years ago

ok i see, i can be better if we "tag" the user to be last, so it allow score to go above or under 1000.

and the slack require an invitation link =)

Hartorn commented 5 years ago

Oh, sry about that, forgot that. https://join.slack.com/t/ffs-events-zerator/shared_invite/enQtNTYxOTU3MTc0NjMwLWJmYTdjMjgwMThmMzUzZGI0NWJjN2I1ZGQ4ZmI4MTM4NTEwYTgxODIwM2U5NWRiYzhmMmM3OTc5Y2Q3ZjQ3YzE

AlexMog commented 5 years ago

Also is this ok to detected if ranking players is needed in Event Ressource? if (entity.status == EventBean.Status.ENDED && bean.getStatus() != EventBean.Status.ENDED) rankAllUsers(mEventId); (the event is now ENDED but wasn't before)

It is ok yes !