예제 #1
0
        public void RemoveOverwritePossibility(Direction direction)
        {
            if (!CanOverwrite(direction))
            {
                return;
            }

            if (overwriteCondition == BlockOverwrite.Any)
            {
                switch (direction)
                {
                case Direction.Vertical:
                    overwriteCondition = BlockOverwrite.HorizontalOnly;
                    return;

                case Direction.Horizontal:
                    overwriteCondition = BlockOverwrite.VerticalOnly;
                    return;
                }
            }
            else
            {
                // we can reach here only if we can overwrite ONLY this direction in this block.
                overwriteCondition = BlockOverwrite.None;
            }
        }
예제 #2
0
 public BlackBlock(BlockOverwrite overwriteCond) : this()
 {
     this.overwriteCondition = overwriteCond;
 }