From 47670aede8a95b81e6d0b6b3cc57415f7f9e8453 Mon Sep 17 00:00:00 2001 From: Kevin Whitaker Date: Sun, 5 Feb 2017 18:38:31 -0500 Subject: [PATCH] Change percentages to allow a little more chance of different genre. --- src/GroovePlayer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GroovePlayer.cpp b/src/GroovePlayer.cpp index a877ab6..240529e 100644 --- a/src/GroovePlayer.cpp +++ b/src/GroovePlayer.cpp @@ -143,7 +143,7 @@ void GroovePlayerMgr::grooveEventLoop() { /** * On first boot, random track that has been voted before will start(or random if no track has been played before). - * When voting ends, if no vote was cast, the first will be picked 60% of the time with second being 30% of the time and third being picked 10% of the time. + * When voting ends, if no vote was cast, the first will be picked 50% of the time with second being 30% of the time and third being picked 20% of the time. * Exception is if third track is the top request, then it is picked. If another song is voted over this, it will be put in back of request queue. */ @@ -287,12 +287,12 @@ void GroovePlayerMgr::grooveEventLoop() { //Pick based on percentages. int pick = rand() % 10 +1; - if(pick <= 6) + if(pick <= 5) { //First track wins winner = currentVoteBatch.front(); } - else if(pick <= 9) + else if(pick <= 8) { //Second track wins. winner = (*std::next(currentVoteBatch.begin(),1)); -- GitLab