public Snailfish(Snailfish parent, int leftValue, int rightValue) { Parent = parent; Left = new SnailfishValue { Value = leftValue }; Right = new SnailfishValue { Value = rightValue }; }
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; }