diff --git a/main.go b/main.go index b2d7b80..ddc1848 100644 --- a/main.go +++ b/main.go @@ -98,6 +98,14 @@ func main() { go func() { sort.SliceStable(entries, func(i, j int) bool { + // Towards the end, sort.SliceStable has the pattern of putting one + // entry in the top button all the time + // Maybe shuffle them + shuf := (rand.Int()%2 == 0) + if shuf { + i, j = j, i + } + mainthread.Wait(func() { comparisons++ @@ -108,6 +116,9 @@ func main() { ui.b2.SetText(formatButtonText(entries[j])) }) + if shuf { + return !<-ret + } return <-ret }) active = false