feat: voting procedures

This commit is contained in:
Ilia Denisov
2026-01-30 12:18:32 +03:00
parent abf72c16b4
commit 824f6609ab
12 changed files with 581 additions and 18 deletions
+2 -2
View File
@@ -87,13 +87,13 @@ func (c *Cache) GiveVotes(race, recipient string) error {
if err != nil {
return err
}
c.g.Race[ri].Vote = c.g.Race[rec].ID
c.g.Race[ri].VoteFor = c.g.Race[rec].ID
return nil
}
func (c *Cache) Voted(ri int) int {
c.validateRaceIndex(ri)
return c.RaceIndex(c.g.Race[ri].Vote)
return c.RaceIndex(c.g.Race[ri].VoteFor)
}
func (c *Cache) UpdateRelation(ri, other int, rel game.Relation) (err error) {