|
|
|
@ -139,10 +139,10 @@ namespace CoreLibrary
|
|
|
|
|
if (!autreCode.EstComplet())
|
|
|
|
|
return indicateurs;
|
|
|
|
|
|
|
|
|
|
Jeton?[] mesJetons = Jetons().ToArray();
|
|
|
|
|
Jeton?[] sesJetons = autreCode.Jetons().ToArray();
|
|
|
|
|
List<Jeton?> mesJetons = new List<Jeton?>(Jetons());
|
|
|
|
|
List<Jeton?> sesJetons = new List<Jeton?>(autreCode.Jetons());
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < mesJetons.Length; ++i)
|
|
|
|
|
for (int i = 0; i < mesJetons.Count; ++i)
|
|
|
|
|
{
|
|
|
|
|
Jeton? monJeton = mesJetons[i];
|
|
|
|
|
Jeton? sonJeton = sesJetons[i];
|
|
|
|
@ -156,25 +156,17 @@ namespace CoreLibrary
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < sesJetons.Length; ++i)
|
|
|
|
|
for (int i = 0; i < sesJetons.Count; ++i)
|
|
|
|
|
{
|
|
|
|
|
Jeton? sonJeton = sesJetons[i];
|
|
|
|
|
|
|
|
|
|
if (sonJeton.HasValue)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (sonJeton.HasValue && mesJetons.Contains(sonJeton.Value))
|
|
|
|
|
{
|
|
|
|
|
for (int j = 0; j < mesJetons.Length; ++j)
|
|
|
|
|
{
|
|
|
|
|
Jeton? monJeton = mesJetons[j];
|
|
|
|
|
|
|
|
|
|
if (monJeton.HasValue && sonJeton.Value.Couleur.Equals(monJeton.Value.Couleur))
|
|
|
|
|
{
|
|
|
|
|
indicateurs = indicateurs.Append(Indicateur.BONNECOULEUR).ToArray();
|
|
|
|
|
mesJetons[j] = null;
|
|
|
|
|
sesJetons[i] = null;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
indicateurs = indicateurs.Append(Indicateur.BONNECOULEUR).ToArray();
|
|
|
|
|
mesJetons[mesJetons.IndexOf(sonJeton)] = null;
|
|
|
|
|
sesJetons[i] = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|