Class Mask
Represents a collection of points that are masked. Usually used to determine whether something is allowed to be placed on a certain position or not.
Inheritance
Inherited Members
Namespace: InsaneScatterbrain.MapGraph
Syntax
public class Mask
Constructors
Mask()
Declaration
public Mask()
Properties
UnmaskedPoints
Gets all the unmasked points.
Declaration
public IReadOnlyCollection<int> UnmaskedPoints { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<T><int> |
Methods
Clone()
Creates a clone of this mask.
Declaration
[Obsolete("Will be removed in version 2.0. Please pass a Mask instance to assign the result to.")]
public Mask Clone()
Returns
Type | Description |
---|---|
Mask | The cloned mask instance. |
Clone(Mask)
Creates a clone of this mask.
Declaration
public void Clone(Mask mask)
Parameters
Type | Name | Description |
---|---|---|
Mask | mask | The mask instance to clone into. |
IsPointMasked(int)
Checks whether the given point is masked or not according to this mask.
Declaration
public bool IsPointMasked(int point)
Parameters
Type | Name | Description |
---|---|---|
int | point | The point. |
Returns
Type | Description |
---|---|
bool | True if the point is masked, false otherwise. |
MaskPoint(int)
Marks a point as masked.
Declaration
public void MaskPoint(int point)
Parameters
Type | Name | Description |
---|---|---|
int | point | The point. |
Merge(Mask, Mask)
Merges this mask and the other mask together to create a new mask instance.
Declaration
public void Merge(Mask otherMask, Mask result)
Parameters
Type | Name | Description |
---|---|---|
Mask | otherMask | The other mask. |
Mask | result | The mask instance that will contain the merged result. |
Merge(Mask)
Merges this mask and the other mask together to create a new mask instance.
Declaration
[Obsolete("Will be removed in version 2.0. Please pass a Mask instance to assign the result to.")]
public Mask Merge(Mask otherMask)
Parameters
Type | Name | Description |
---|---|---|
Mask | otherMask | The other mask. |
Returns
Type | Description |
---|---|
Mask | The new merged mask instance. |
Reset()
Declaration
public void Reset()
Set(IEnumerable<int>)
Declaration
public void Set(IEnumerable<int> initialUnmaskedPoints)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T><int> | initialUnmaskedPoints |
Set(int)
Declaration
public void Set(int numUnmaskedPoints)
Parameters
Type | Name | Description |
---|---|---|
int | numUnmaskedPoints |
UnmaskPoint(int)
Marks a point as unmasked.
Declaration
public void UnmaskPoint(int point)
Parameters
Type | Name | Description |
---|---|---|
int | point | The point. |