refactor: floats, tests

This commit is contained in:
Ilia Denisov
2026-02-04 18:33:38 +02:00
parent 9d46abe805
commit 6a603ea9ad
37 changed files with 381 additions and 722 deletions
+4 -3
View File
@@ -48,11 +48,12 @@ func (c *Cache) TurnCalculateVotes() []int {
c.g.Votes = 0
for ri, votes := range raceVotes {
c.g.Race[ri].Votes = votes
c.g.Votes += votes
v := game.F(votes)
c.g.Race[ri].Votes = v
c.g.Votes += v
}
return votingWinners(calc, c.g.Votes)
return votingWinners(calc, c.g.Votes.F())
}
func VotingGraph(races []game.Race, raceIndex func(uuid.UUID) int) []*VoteNode {