public void AddSegment(Position position) { if (Segments.Count < DesiredLength) { Segments.Add(position); } else { var tailPosition = TailPosition; Match.IsOccupied[tailPosition.X, tailPosition.Y] = false; Segments.Rotate(position); } Match.IsOccupied[position.X, position.Y] = true; }