summaryrefslogblamecommitdiff
path: root/members.go
blob: a773dbce96d54f6e5e1dde7871a8273c8b758f6b (plain) (tree)
1
2
3
4
5
6
7
8
9






                   
                                                           
                                    
                      
                    
                    

                                           
                                        
         

                     
package main

import (
	"math/rand"
	"time"
)

func getRandomMember(team []string, except string) string {
	rand.Seed(time.Now().Unix())
	found := false
	member := ""
	for !found {
		n := rand.Int() % len(team)
		member = team[n]
		found = member != except
	}
	return member
}