feat: voting procedures
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user