Suppression des choses non utilisées
continuous-integration/drone/push Build is failing Details

pull/111/head
Remi NEVEU 11 months ago
parent e5fb6eba95
commit 371948095e

@ -1,11 +0,0 @@
namespace Models.Exceptions
{
/// <summary>
/// Exception for when the cell coordinates are invalid.
/// </summary>
public class InvalidCellCoordinatesException : Exception
{
public InvalidCellCoordinatesException(string message) : base(message) { }
}
}

@ -1,11 +0,0 @@
namespace Models.Exceptions
{
/// <summary>
/// Exception for when the cell is invalid.
/// </summary>
public class InvalidCellException : Exception
{
public InvalidCellException(string message) : base(message) { }
}
}

@ -1,11 +0,0 @@
namespace Models.Exceptions
{
/// <summary>
/// Exception for when the cell is invalid.
/// </summary>
public class InvalidPlaceResultException : Exception
{
public InvalidPlaceResultException(string message) : base(message) { }
}
}

@ -8,8 +8,6 @@ namespace Models.Interfaces
/// </summary>
public interface IRules
{
//public bool NearCellIsValid(Position playerChoicePosition, SortedDictionary<Position, Cell> cells);
/// <summary>
/// Return true if the cell is empty, otherwise false.
/// </summary>
@ -25,15 +23,6 @@ namespace Models.Interfaces
/// <returns>true if the cell is valid; otherwise, false</returns>
public bool IsCellValid(Cell playerChoicePosition, List<Cell> cells);
//public bool IsRopePath(Cell playerChoice, HashSet<RopePath> ropePaths);
//public bool IsAdjacent(Cell cell1, Cell cell2, List<Position, Cell> cells);
//public int HowMany(Cell playerChoice, List<Position, Cell> cells);
//public void SetValueAndPenalty(int valueChoice, Cell playerChoice, List<Position, Cell> cells);
/// <summary>
/// Check if the given cell is adjacent to the target cell.
/// </summary>

@ -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<Cell> cells)
//{
// if (choosenCell == null || cells == null) return false;
// IEnumerable<Cell> 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<Cell> 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
}
}

Loading…
Cancel
Save