From dc06d7cf5960aabb99901ab905110b5b3211d828 Mon Sep 17 00:00:00 2001
From: Gabrielle van de Vijver <gabrielle.van-de-vijver@etu.utc.fr>
Date: Sun, 1 Oct 2023 18:45:10 +0200
Subject: [PATCH] suppression du print

---
 comsoc/GenerateProfile.go | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/comsoc/GenerateProfile.go b/comsoc/GenerateProfile.go
index 14f0871..728df7f 100644
--- a/comsoc/GenerateProfile.go
+++ b/comsoc/GenerateProfile.go
@@ -1,14 +1,13 @@
 package comsoc
 
 import (
-	"fmt"
 	"math/rand"
 	"time"
 )
 
-func GenerateProfile(nVoters int, nAlts int) {
+func GenerateProfile(nVoters int, nAlts int)(profil Profile) {
 	// Initialisation du profil
-	profil := make([][]Alternative, nVoters)
+	profil = make([][]Alternative, nVoters)
 	for i := range profil {
 		profil[i] = make([]Alternative, nAlts)
 	}
@@ -32,8 +31,5 @@ func GenerateProfile(nVoters int, nAlts int) {
 		// Remplit la ligne avec la permutation
 		copy(profil[i], permutation)
 	}
-	
-	for _, row := range profil {
-		fmt.Println(row)
-	}
+	return profil
 }
\ No newline at end of file
-- 
GitLab