|
|
|
@ -25,7 +25,7 @@ namespace Models.Rules
|
|
|
|
|
{
|
|
|
|
|
if (!IsCellEmpty(playerChoicePosition)) return false;
|
|
|
|
|
|
|
|
|
|
if (playerChoicePosition.Valid == false) return false;
|
|
|
|
|
if (!playerChoicePosition.Valid) return false;
|
|
|
|
|
|
|
|
|
|
if (EveryAdjacentCells(playerChoicePosition, cells).Count == 1) return false;
|
|
|
|
|
|
|
|
|
@ -46,13 +46,10 @@ namespace Models.Rules
|
|
|
|
|
|
|
|
|
|
public bool IsInRopePaths (Cell adjacente,List<List<Cell>> ropePaths, out int index)
|
|
|
|
|
{
|
|
|
|
|
foreach (List<Cell> path in ropePaths)
|
|
|
|
|
foreach (var path in ropePaths.Where(path => path.Contains(adjacente)))
|
|
|
|
|
{
|
|
|
|
|
if (path.Contains(adjacente))
|
|
|
|
|
{
|
|
|
|
|
index=ropePaths.IndexOf(path);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
index=ropePaths.IndexOf(path);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
index = 0;
|
|
|
|
@ -74,7 +71,7 @@ namespace Models.Rules
|
|
|
|
|
|
|
|
|
|
IEnumerable<Cell> PlayedCellsQuery =
|
|
|
|
|
from cell in cells
|
|
|
|
|
where cell.Valid == true
|
|
|
|
|
where cell.Valid
|
|
|
|
|
select cell;
|
|
|
|
|
|
|
|
|
|
foreach (var cell in PlayedCellsQuery)
|
|
|
|
@ -112,8 +109,6 @@ namespace Models.Rules
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool IsValueInZones(Cell chosenCell, List<List<Cell>> zones)
|
|
|
|
|