namespace SpriteCompiler.AI { using System; using System.Collections.Generic; using Queue; public abstract class AbstractStateSpaceSearch : ISearch where T : ISearchNode where C : ICost { protected readonly ISearchStrategy strategy; private readonly Func> fringe; public AbstractStateSpaceSearch(ISearchStrategy strategy, Func> fringe) { this.strategy = strategy; this.fringe = fringe; } public virtual IEnumerable Search(ISearchProblem problem, S initialState) { return strategy.Search(problem, fringe(), initialState); } } }