// create a column object who's value equals or exceeds a given a target value and column type
        public static Column createMaxColumn(double targetValue, char columnType)
        {
            Column column = new Column();
            column.Type = columnType;

            int baseValue = -1;
            switch (columnType)
            {
                case 'X':
                    baseValue = 10;
                    break;

                case 'Y':
                    baseValue = 26;
                    break;

                case 'Z':
                    baseValue = 36;
                    break;
            }
            column.Value = baseValue;
            column.Exponent = 1;
            while (column.Value < targetValue)
            {
                column.Value *= baseValue;
                column.Exponent++;
            }
            return column;
        }
 private Column selectSmallestColumnValue(Column column1, Column column2, Column column3)
 {
     Column result = null;
     double minValue = getMinValue(column1.Value, column2.Value, column3.Value);
     if (minValue == column1.Value)
     {
         column1.setAsPrimary();
         column2.setAsSecondary();
         column3.setAsSecondary();
         result = column1;
     }
     else if (minValue == column2.Value)
     {
         column2.setAsPrimary();
         column1.setAsSecondary();
         column3.setAsSecondary();
         result = column2;
     }
     else if (minValue == column3.Value)
     {
         column3.setAsPrimary();
         column1.setAsSecondary();
         column2.setAsSecondary();
         result = column3;
     }
     return result;
 }
        private List<char> createColumnList(Column column)
        {
            List<char> columnList = new List<char>();

            for (int i = 0; i < column.Exponent; i++)
                columnList.Add(column.Type);
            return columnList;
        }