|
|
@ -135,10 +135,7 @@ namespace Models.Game
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int index =0;
|
|
|
|
int index =0;
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var cells in adjacentes)
|
|
|
|
foreach (var cells in adjacentes.Where(cells => cells.Value - playerChoice.Value == 1 || cells.Value - playerChoice.Value == -1))
|
|
|
|
{
|
|
|
|
|
|
|
|
// La cellule choisi peut creer/s'ajouter a un chemin de corde
|
|
|
|
|
|
|
|
if (cells.Value - playerChoice.Value == 1 || cells.Value - playerChoice.Value == -1)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Le cas si il n'existe aucun chemin de corde
|
|
|
|
// Le cas si il n'existe aucun chemin de corde
|
|
|
|
if (UsedMap.RopePaths.Count == 0)
|
|
|
|
if (UsedMap.RopePaths.Count == 0)
|
|
|
@ -164,17 +161,9 @@ namespace Models.Game
|
|
|
|
{
|
|
|
|
{
|
|
|
|
UsedMap.RopePaths[index].Add(playerChoice);
|
|
|
|
UsedMap.RopePaths[index].Add(playerChoice);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Si oui, est-ce que le chemin possede deja la valeur correspondante a la valeur de la cellule du joueur choisi
|
|
|
|
|
|
|
|
// {playerChoice.Value} n'est pas dans le chemin de corde
|
|
|
|
|
|
|
|
// Ajouter au chemin
|
|
|
|
|
|
|
|
// {playerChoice.Value} existe dans le chemin de corde pas possible
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Initializes the game.
|
|
|
|
/// Initializes the game.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|