Example #1
0
 /// <summary>
 /// Checks that the neighbors of the cell allow this option
 /// </summary>
 private bool GetIsValidByPlacement(ItemBlueprint item)
 {
     return(UpNeighbor.DoesDownConnectTo(item.Up) &&
            DownNeighbor.DoesUpConnectTo(item.Down) &&
            LeftNeighbor.DoesRightConnectTo(item.Left) &&
            RightNeighbor.DoesLeftConnectTo(item.Right));
 }
Example #2
0
 private void HandleContradiction()
 {
     ResetOptions();
     LeftNeighbor.ResetOptions();
     RightNeighbor.ResetOptions();
     UpNeighbor.ResetOptions();
     DownNeighbor.ResetOptions();
 }