Open CptPie opened 3 years ago
Could the negative edgecase be solved with min(0, abs(max(amount / 10, voteSettings)))
?
Yeah, something like that could work. Nevertheless i think that negative votes already are cought (i.e. you cant vote if you have <1 votes) but better save then sorry :).
Negative votes are already handled properly. If you have less than zero votes, you need to remove votes from movies until you have a positive number of votes in order to place another vote.
As we discussed several times before we considered a dynamic way to allocate (increase) votes depending on the amount of movies added.
A simple formula would be:
max(amountMovies/10,voteSetting)
i.e. either we have the Votes configured in the server settings or if the calculated value is higher, this calculated vote count is used.Ofcourse we would need to check edgecases where a user might have negative votes (since the movie count decreased since he spent all votes but got none back) but that shouldnt be too hard.