code: func Roulette(genomeArray []IGenome, totalFitness int) *IGenome {
  
  	if len(genomeArray) == 0 {
  		panic("genome array contains no elements")
  	}
  
  	if totalFitness == 0 {
  		randomIndex := rand.Intn(len(genomeArray))
  		return &genomeArray[randomIndex]
  	}
  
  	randomFitness := rand.Intn(totalFitness)
  	for i := range genomeArray {
  		randomFitness -= genomeArray[i].GetFitness()
  		if randomFitness <= 0 {
  			return &genomeArray[i]
  		}
  	}
  
  	panic("total fitness is too large")
  }
docs: // Roulette is a selection function that selects a genome where genomes that have a higher fitness are more likely to be picked