✔ calcule du score des chemins de corde
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details

pull/90/head
Lucas DUFLOT 11 months ago
parent e4e14adf45
commit 72803fe862

@ -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;
}
}
}
Loading…
Cancel
Save