public R2NCLetter() { letter = new R2Letter <R2NCLetter, R2NCDirection>(); letter.OnPlane = R2Plane.GetR2Plane(); _startingPoint = new R2Point().Position; Fill(); }
// Compare two letters. public int CompareTo(R2Letter <R2Direction, V> other) { int returnValue = 0; if (letter.MyLetter < other.letter.MyLetter) { returnValue = -1; } else if (letter.MyLetter < other.letter.MyLetter) { returnValue = 1; } else { if (letter.MyDirection < other.letter.MyDirection) { returnValue = -1; } else if (letter.MyDirection > other.letter.MyDirection) { returnValue = 1; } else { if (letter.Smaller && !other.letter.Smaller) { returnValue = -1; } else if (!letter.Smaller && other.letter.Smaller) { returnValue = 1; } } } return(returnValue); }