I think we should edit this to be the other way around, so that the solvers returned if they handle is correctly. We can either do this, or have an output doBreak bool to the solve method, so firstly we know if the solver actually executed and the second whether the solver wants us to break from all other solvers.
Something like:
private void ExecuteSolvers(IEntity entity, TileChangedArgs e)
{
foreach (ISolver solver in solvers)
{
bool dobreak;
solver.Solve(entity, e, doBreak);
if (doBreak)
{
break;
}
}
}
We could also have the return value still to do any logging, or other business that is required.
We also need to have tests written for this.
Ideas?