Change percentages to allow a little more chance of different genre.
This commit is contained in:
@@ -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).
|
* 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.
|
* 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.
|
//Pick based on percentages.
|
||||||
int pick = rand() % 10 +1;
|
int pick = rand() % 10 +1;
|
||||||
if(pick <= 6)
|
if(pick <= 5)
|
||||||
{
|
{
|
||||||
//First track wins
|
//First track wins
|
||||||
winner = currentVoteBatch.front();
|
winner = currentVoteBatch.front();
|
||||||
}
|
}
|
||||||
else if(pick <= 9)
|
else if(pick <= 8)
|
||||||
{
|
{
|
||||||
//Second track wins.
|
//Second track wins.
|
||||||
winner = (*std::next(currentVoteBatch.begin(),1));
|
winner = (*std::next(currentVoteBatch.begin(),1));
|
||||||
|
|||||||
Reference in New Issue
Block a user