Adjust Bomb Behavior
This commit is contained in:
@@ -17,8 +17,14 @@ namespace Services
|
||||
if (matchPositions == null || matchPositions.Count == 0)
|
||||
return Array.Empty<Vector2Int>();
|
||||
|
||||
HashSet<Vector2Int> candidates = new HashSet<Vector2Int>();
|
||||
|
||||
return matchPositions.Distinct().ToList();
|
||||
}
|
||||
|
||||
// This is the old implementation wherein any adjacent matches will detonate the bomb
|
||||
private List<Vector2Int> DetonateThroughAdjacentMatches(IReadOnlyList<Vector2Int> matchPositions) {
|
||||
HashSet<Vector2Int> candidates = new HashSet<Vector2Int>();
|
||||
|
||||
foreach (Vector2Int p in matchPositions)
|
||||
{
|
||||
candidates.Add(p + Vector2Int.left);
|
||||
@@ -26,7 +32,7 @@ namespace Services
|
||||
candidates.Add(p + Vector2Int.up);
|
||||
candidates.Add(p + Vector2Int.down);
|
||||
}
|
||||
|
||||
|
||||
return candidates.ToList();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user