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

@@ -7,7 +7,25 @@ using Structs;
namespace Services.Interfaces {
public interface IMatchService {
HashSet<Gem> CurrentMatches { get; }
UniTask<List<Vector2Int>> GetMatchPositionsAsync(List<Vector2Int> protectedPositions);
/// <summary>
/// Get positions of all matches that are not protected.
/// </summary>
/// <param name="protectedPositions">
/// Protected positions, bombs that we don't want to destroy.
/// </param>
/// <returns></returns>
UniTask<HashSet<Vector2Int>> GetMatchPositionsAsync(List<Vector2Int> protectedPositions);
/// <summary>
/// Checks if there are any matches at the given position and type.
/// </summary>
/// <param name="positionToCheck">
/// Position on the gameBoard to check.
/// </param>
/// <param name="gemTypeToCheck">
/// Type of gem to check.
/// </param>
/// <returns></returns>
bool MatchesAt(Vector2Int positionToCheck, GemType gemTypeToCheck);
void FindAllMatches();
}