diff --git a/source/Trek-12/Models/Exceptions/InvalidCellCoordinatesException.cs b/source/Trek-12/Models/Exceptions/InvalidCellCoordinatesException.cs
deleted file mode 100644
index 4f4e53d..0000000
--- a/source/Trek-12/Models/Exceptions/InvalidCellCoordinatesException.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace Models.Exceptions
-{
- ///
- /// Exception for when the cell coordinates are invalid.
- ///
- public class InvalidCellCoordinatesException : Exception
- {
- public InvalidCellCoordinatesException(string message) : base(message) { }
- }
-}
-
diff --git a/source/Trek-12/Models/Exceptions/InvalidCellException.cs b/source/Trek-12/Models/Exceptions/InvalidCellException.cs
deleted file mode 100644
index 7556c26..0000000
--- a/source/Trek-12/Models/Exceptions/InvalidCellException.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace Models.Exceptions
-{
- ///
- /// Exception for when the cell is invalid.
- ///
- public class InvalidCellException : Exception
- {
- public InvalidCellException(string message) : base(message) { }
- }
-}
-
diff --git a/source/Trek-12/Models/Exceptions/InvalidPlaceResultException.cs b/source/Trek-12/Models/Exceptions/InvalidPlaceResultException.cs
deleted file mode 100644
index de8fdd0..0000000
--- a/source/Trek-12/Models/Exceptions/InvalidPlaceResultException.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace Models.Exceptions
-{
- ///
- /// Exception for when the cell is invalid.
- ///
- public class InvalidPlaceResultException : Exception
- {
- public InvalidPlaceResultException(string message) : base(message) { }
- }
-}
-
diff --git a/source/Trek-12/Models/Interfaces/IRules.cs b/source/Trek-12/Models/Interfaces/IRules.cs
index 1b9cb8d..c2dbd70 100644
--- a/source/Trek-12/Models/Interfaces/IRules.cs
+++ b/source/Trek-12/Models/Interfaces/IRules.cs
@@ -8,8 +8,6 @@ namespace Models.Interfaces
///
public interface IRules
{
- //public bool NearCellIsValid(Position playerChoicePosition, SortedDictionary cells);
-
///
/// Return true if the cell is empty, otherwise false.
///
@@ -25,15 +23,6 @@ namespace Models.Interfaces
/// true if the cell is valid; otherwise, false
public bool IsCellValid(Cell playerChoicePosition, List cells);
- //public bool IsRopePath(Cell playerChoice, HashSet ropePaths);
-
- //public bool IsAdjacent(Cell cell1, Cell cell2, List cells);
-
- //public int HowMany(Cell playerChoice, List cells);
-
- //public void SetValueAndPenalty(int valueChoice, Cell playerChoice, List cells);
-
-
///
/// Check if the given cell is adjacent to the target cell.
///
diff --git a/source/Trek-12/Models/Rules/Rules.cs b/source/Trek-12/Models/Rules/Rules.cs
index 7e17b3e..54a29e4 100644
--- a/source/Trek-12/Models/Rules/Rules.cs
+++ b/source/Trek-12/Models/Rules/Rules.cs
@@ -29,26 +29,7 @@ namespace Models.Rules
return true;
}
-
- //public bool IsCellAdjacent(Cell choosenCell, Cell targetCell)
- //{
- // if (Math.Abs(choosenCell.X - targetCell.X) > 1 || Math.Abs(choosenCell.Y - targetCell.Y) > 1)
- // return false;
- // if (Math.Abs(choosenCell.X - targetCell.X) > 1 && Math.Abs(choosenCell.Y - targetCell.Y) > 1)
- // return false;
- // if (choosenCell.X == 0 && targetCell.X == 4)
- // return false;
- // if (choosenCell.Y == 0 && targetCell.Y == 4)
- // return false;
- // if (choosenCell.X == 4 && targetCell.X == 0)
- // return false;
- // if (choosenCell.Y == 4 && targetCell.Y == 0)
- // return false;
- // if (choosenCell.X == targetCell.X && choosenCell.Y == targetCell.Y)
- // return false;
-
- // return true;
- //}
+
public bool IsCellAdjacent(Cell choosenCell, Cell targetCell)
{
@@ -85,24 +66,6 @@ namespace Models.Rules
}
return false;
}
- //public bool NearCellIsValid(Cell choosenCell, List cells)
- //{
- // if (choosenCell == null || cells == null) return false;
-
- // IEnumerable PlayedCellsQuery =
- // from cell in cells
- // where cell.Value != null
- // select cell;
-
- // foreach (var cell in PlayedCellsQuery)
- // {
- // if(!IsCellAdjacent(choosenCell, cell)) continue;
-
- // return true;
- // }
-
- // return false;
- //}
public bool NearCellIsValid(Cell choosenCell, List cells)
{
@@ -145,8 +108,6 @@ namespace Models.Rules
{
NewZoneIsCreated(chosenCell, cells, map);
}
- //return true; // Il y a une cellule adjacente avec la même valeur donc une zone est créée si elle n'est pas déjà existante
- // Si il return true, tout c'est bien passer
}
}
| | | |