calculCheminCorde
dev
@ -9,6 +9,10 @@ namespace ConsoleApp;
class Program
{
/// <summary>
/// Main function of the console app
/// </summary>
@ -60,5 +60,6 @@
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;