public void RegenerateValidatedPaths(LocatedItem <TEntity> locatedItem) { Guard.NotNull(locatedItem, $"Null item found!"); var paths = _pathsValidator.GetValidatedPaths(this, locatedItem.Item, locatedItem.Location); locatedItem.UpdatePaths(paths); }
public void PlaceEntity(BoardLocation loc, TEntity entity) => _items[loc] = new LocatedItem <TEntity>(loc, entity, null);
public static BoardMove FindMoveTo <TEntity>(this LocatedItem <TEntity> item, BoardLocation destination) where TEntity : class, IBoardEntity { return(item.Paths.FlattenMoves() .SingleOrDefault(m => m.To.Equals(destination))); }