// Assets/Scripts/Services/Interfaces/IBombService.cs
using System;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using Enums;
using Models.Interfaces;
using UnityEngine;
namespace Services.Interfaces
{
public interface IBombService {
///
/// Caches last swap action.
///
///
/// Original location of the gem.
///
///
/// Destination location of the gem.
///
void SetLastSwap(Vector2Int from, Vector2Int to);
///
/// Try to spawn a bomb at the last swap location.
///
///
/// List of current matches.
///
void DetectBombSpawnFromLastSwap(HashSet currentMatches);
List ApplyPendingBombSpawns(Action spawnGem);
///
/// Get a List of bombs that we will detonate.
///
///
/// Protected positions, bombs that we don't want to destroy.
///
///
/// Possible bombs.
///
///
UniTask> GetInitialBombs(List protectedPositions, HashSet bombCandidates);
///
/// Detonate the bomb(s) part of the match. If there are other bombs within the radius, they will be detonated too sequentially.
///
///
/// List of bombs to detonate.
///
///
/// Destroy function reference.
///
///
/// Gameboard reference.
///
///
UniTask DetonateChainAsync(
IReadOnlyList initialBombs,
Func destroyAtAsync,
IGameBoard gameBoard);
}
}