~edwargix/tallyard

0945ec7b0dfd6a3518730b7d9f9e671007801be1 — David Florness 5 years ago c4859fa
Better for loop
1 files changed, 3 insertions(+), 1 deletions(-)

M ui.go
M ui.go => ui.go +3 -1
@@ 132,7 132,9 @@ func GetBallotFromRankings(ranks []int) []byte {
	for len(candidates) > 0 {
		r := ranks[candidates[0]]
		i := 1
		for ; i < len(candidates) && ranks[candidates[i]] == r; i++ {}
		for i < len(candidates) && ranks[candidates[i]] == r {
			i++
		}
		// i is now index of the first candidate with worse (i.e. higher
		// in value) rank
		row := make([]byte, n)