a beautyfull non working application :)
This commit is contained in:
@@ -9,7 +9,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace WaveFunctionCollapseCLI
|
||||
{
|
||||
internal class Tile
|
||||
internal class Tile:ICloneable,IEqualityComparer<Tile>
|
||||
{
|
||||
private List<TileType> _possibleTyles;
|
||||
private List<TileType> _avaibleTypes;
|
||||
@@ -26,5 +26,25 @@ namespace WaveFunctionCollapseCLI
|
||||
PossibleTyles.Add(theType);
|
||||
}
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
Tile copy = new Tile(this.AvaibleTypes);
|
||||
copy.PossibleTyles.Clear();
|
||||
foreach (TileType pt in PossibleTyles)
|
||||
{
|
||||
copy.PossibleTyles.Add((TileType)pt.Clone());
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
public bool Equals(Tile x, Tile y)
|
||||
{
|
||||
return x.PossibleTyles.Equals(y.PossibleTyles);
|
||||
}
|
||||
public int GetHashCode(Tile obj)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user