for(q = qhead.next; q != &qhead; q = q->next)
if(q->state == playing_random && q->next != &qhead)
q->state = playing_unplayed;
for(q = qhead.next; q != &qhead; q = q->next)
if(q->state == playing_random && q->next != &qhead)
q->state = playing_unplayed;