/// <summary> /// Creates a new command for adding/removing one or more <see cref="Positionable{TCoordinates}"/>ies to/from a <see cref="UniverseBase{TCoordinates}"/>. /// </summary> /// <param name="universe">The <see cref="UniverseBase{TCoordinates}"/> to add to / remove from.</param> /// <param name="positionables">The <see cref="Positionable{TCoordinates}"/>s to add/remove.</param> protected AddRemovePositionables(UniverseBase <TCoordinates> universe, IEnumerable <Positionable <TCoordinates> > positionables) { #region Sanity checks if (universe == null) { throw new ArgumentNullException(nameof(universe)); } if (positionables == null) { throw new ArgumentNullException(nameof(positionables)); } #endregion _universe = universe; // Create local defensive copy of entities _positionables = new List <Positionable <TCoordinates> >(positionables); }
/// <summary> /// Creates a new command for removing one or more <see cref="Positionable{TCoordinates}"/>s from a <see cref="IUniverse"/>. /// </summary> /// <param name="universe">The <see cref="UniverseBase{TCoordinates}"/> to remove from.</param> /// <param name="entities">The <see cref="Positionable{TCoordinates}"/>s to remove.</param> public RemovePositionables(UniverseBase <TCoordinates> universe, IEnumerable <Positionable <TCoordinates> > entities) : base(universe, entities) { }