calculCheminCorde #90

Closed
remi.neveu wants to merge 2 commits from calculCheminCorde into dev

@ -8,7 +8,11 @@ using Models.Game;
namespace ConsoleApp;
class Program
{
{
/// <summary>
/// Main function of the console app
/// </summary>

@ -59,6 +59,7 @@
if (other == null) return false;
if (this.X == other.X && this.Y == other.Y) return true;
return false;
}
}
}
}

@ -201,5 +201,23 @@ namespace Models.Rules
return calculus;
}
public int? ScoreRopePaths(List<Cell> paths)
{
int? score = 0;
IEnumerable<Cell> sortPaths =
from cell in paths
orderby cell.Value descending
select cell;
foreach (var item in sortPaths)
{
if (score == 0)
score += item.Value;
else
score++;
}
return score;
}
}
}
Loading…
Cancel
Save