예제 #1
0
                public SnailfishValue Copy(Snailfish parent) =>
                IsFish
                                        ? new SnailfishValue
                {
                    Fish = Fish.Copy(parent)
                }

                                        : new SnailfishValue {
                    Value = Value
                };
예제 #2
0
 public Snailfish(Snailfish left, Snailfish right)
 {
     Parent = null;
     Left   = new SnailfishValue {
         Fish = left.Copy()
     };
     Right = new SnailfishValue {
         Fish = right.Copy()
     };
     Left.Fish.Parent = Right.Fish.Parent = this;
 }