From e113ee2ac6e29a808419ac2383c53c37f898c106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20LAVERGNE?= Date: Sat, 8 Jun 2024 23:24:17 +0200 Subject: [PATCH] Code Smells de Rules.cs --- source/Trek-12/Models/Interfaces/IRules.cs | 2 +- source/Trek-12/Models/Rules/Rules.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/Trek-12/Models/Interfaces/IRules.cs b/source/Trek-12/Models/Interfaces/IRules.cs index b0b6e64..c2dbd70 100644 --- a/source/Trek-12/Models/Interfaces/IRules.cs +++ b/source/Trek-12/Models/Interfaces/IRules.cs @@ -103,7 +103,7 @@ namespace Models.Interfaces /// The list of rope paths. /// The index of the rope path. /// True if the adjacent cell is in the rope path; otherwise false. - public bool IsInRopePaths(Cell adjacente, List> ropePaths, out int index); + public bool IsInRopePaths(Cell adjacente, List> ropePaths, int index); /// /// Check if the chosen cell has the same value as the rope path at the given index. diff --git a/source/Trek-12/Models/Rules/Rules.cs b/source/Trek-12/Models/Rules/Rules.cs index d272c51..ae52e34 100644 --- a/source/Trek-12/Models/Rules/Rules.cs +++ b/source/Trek-12/Models/Rules/Rules.cs @@ -44,7 +44,7 @@ namespace Models.Rules } - public bool IsInRopePaths (Cell adjacente,List> ropePaths, out int index) + public bool IsInRopePaths (Cell adjacente,List> ropePaths, int index) { foreach (var path in ropePaths.Where(path => path.Contains(adjacente))) { @@ -153,7 +153,6 @@ namespace Models.Rules return; } } - return; } public void NewZoneIsCreated(Cell firstCell, Cell secondCell, Map map)