#include #include Func _TrieDonneesScore($ScorePath) Local $SCORE, $n = 1, $k = 0 _FileReadToArray($ScorePath, $SCORE, Default, ",") If @error Then Return -1 ;_ArrayDisplay($SCORE);on voit bien que nos scores sont affichés ;on va cherche a les départager en fct de leur lv de difficulté (laby de 10x10,5x5, etc..) Local $NvDeDifficulte[$k][$n] For $i = 1 To $SCORE[0][0] If _ArraySearch($NvDeDifficulte, $SCORE[$i][2], 0, 0, 0, 1, 1, 0) = -1 Then $k += 1 If $n = 1 Then $n += 1 ReDim $NvDeDifficulte[$k][$n] $NvDeDifficulte[$k - 1][$n - 2] = $SCORE[$i][2] $NvDeDifficulte[$k - 1][$n - 1] = $SCORE[$i][0] & "|" & $SCORE[$i][1] Else $n += 1 ReDim $NvDeDifficulte[UBound($NvDeDifficulte)][$n] $NvDeDifficulte[_ArraySearch($NvDeDifficulte, $SCORE[$i][2], 0, 0, 0, 1, 1, 0)][$n - 1] = $SCORE[$i][0] & "|" & $SCORE[$i][1] EndIf Next ;_ArrayDisplay($NvDeDifficulte);fini ;dans chaque ligne de notre tableau on a des resultats pour des niveaux de difficulté différents ;le top serais alors de classer toutes ces lignes par score, on peut alors psenser a utiliser un tableau 3d, ou alors a faire un tableau dans les cellules de la ligne de diff ;on prendra par mesure de simplicité la solution 2 ici ;premierement, jinsere juste apres lelv de diff cb de parties on été réalisées: Local $list[0] For $i = 0 To $k - 1 Local $compt = 0 For $j = 1 To $n - 1 If $NvDeDifficulte[$i][$j] <> "" Then $compt += 1 Else ExitLoop EndIf Next _ArrayAdd($list, $compt) Next _ArrayColInsert($NvDeDifficulte, 1) For $i = 0 To UBound($list) - 1 $NvDeDifficulte[$i][1] = $list[$i] Next ;_ArrayDisplay($NvDeDifficulte) ;ensuite je vais classer ses données Local $other = $NvDeDifficulte For $i = 0 To $k - 1 Local $temp[$NvDeDifficulte[$i][1]][2] For $j = 2 To $NvDeDifficulte[$i][1] + 1 $temp[$j - 2][0] = StringSplit($NvDeDifficulte[$i][$j], "|")[1] $temp[$j - 2][1] = StringSplit($NvDeDifficulte[$i][$j], "|")[2] Next _ArraySort($temp, 0, 0, 0, 1) $other[$i][2] = $temp ;_ArrayDisplay($temp) Next For $i = 3 To UBound($other, 2) - 1 _ArrayColDelete($other, $i) Next ;~ _ArrayDisplay($other) ;fini Return $other EndFunc ;==>_TrieDonneesScore