Optimization and Documentation

This commit is contained in:
2025-12-18 03:44:51 +08:00
parent 1d134ffc40
commit 668bd03f63
10 changed files with 204 additions and 53 deletions

View File

@@ -49,9 +49,9 @@ namespace Services {
return false;
}
public UniTask<List<Vector2Int>> GetMatchPositionsAsync(List<Vector2Int> protectedPositions) {
List<Vector2Int> matchPositions = new List<Vector2Int>(this.currentMatches.Count);
public UniTask<HashSet<Vector2Int>> GetMatchPositionsAsync(List<Vector2Int> protectedPositions) {
HashSet<Vector2Int> matchPositions = new HashSet<Vector2Int>();
List<Gem> matches = this.currentMatches.ToList();
for (int i = 0; i < matches.Count; i++) {
Gem match = matches[i];