using System.Collections.Generic;

namespace pdinklag.CPW.Common
{
    /// <summary>
    /// Used to observe whether one or more strikes during a move have hit other wrestlers.
    /// </summary>
    public interface IStrikeHitObserver
    {
        /// <summary>
        /// Reports whether any other wrestlers have been hit by a strike since the observation started.
        /// </summary>
        bool AnyHits { get; }

        /// <summary>
        /// Tests whether a specific wrestler was hit since the observation started.
        /// </summary>
        /// <param name="w">the wrestler in question</param>
        bool HasHit(IWrestler w);

        /// <summary>
        /// Reports the wrestlers who were hit since the observation started.
        /// </summary>
        IEnumerable<IWrestler> HitWrestlers { get; }

        /// <summary>
        /// Ends the observation.
        /// Whoever created the observer is responsible for calling this to prevent leaks.
        /// </summary>
        void End();
    }
}
