Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VolunteerControl ¶
type VolunteerControl struct { AuthSet Self Identity Volunteer *messages.VolunteerMessage Votes map[Identity]messages.LeaderLevelMessage }
VolunteerControl will keep a record of all votes for a given volunteer and produce the best vote possible.
func NewVolunteerControl ¶
func NewVolunteerControl(self Identity, authset AuthSet) *VolunteerControl
func (*VolunteerControl) AddVote ¶
func (v *VolunteerControl) AddVote(msg messages.LeaderLevelMessage) bool
addVote just adds the vote to the vote map, and will not act upon it
func (*VolunteerControl) CheckVoteCount ¶
func (v *VolunteerControl) CheckVoteCount() *messages.LeaderLevelMessage
checkVoteCount will check to see if we have enough votes to issue a ranked message. We will not add that message to our votemap, as we may have not chosen to actually send that vote. If we decide to send that vote, we will get it sent back to us
Returns a LeaderLevelMessage with the level set, however it may need adjusting! (Can only adjust it up)
func (*VolunteerControl) Copy ¶
func (a *VolunteerControl) Copy() *VolunteerControl
Click to show internal directories.
Click to hide internal directories.