Exemple #1
0
        public ChipsList GetRange(int index, int count)
        {
            ChipsList cplst_to_be_returned = new ChipsList();

            cplst_to_be_returned.mChipsList = this.mChipsList.GetRange(index, count);
            return(cplst_to_be_returned);
        }
        public static ChipsList BuildChipsConfiguration(Tuple <int, int> IN_row_column_config, string[] IN_inputed_str_array)
        {
            ChipsList     cplst  = new ChipsList();
            List <string> strlst = IN_inputed_str_array.OfType <string>().ToList();

            foreach (var str in IN_inputed_str_array)
            {
                Color color = dict_string_color[str];
                cplst.Add(new Chip(color));
            }
            return(cplst);
        }
 public void ReadConfiguration(string filename)
 {
     string[] inputed_str = PzzConfigFileReader.ReadAsArray(filename);
     this.mChipsList = PzzConfigFileReader.BuildChipsConfiguration(this.mRowColumnConfig, inputed_str);
     for (int i = 0; i < this.mChipsList.Count; i++)
     {
         if (Color.Transparent == this.mChipsList[i].mChipColor)
         {
             this.mCurrentEmptySpaceIndex = i;
         }
     }
 }
 public Controller(Tuple <int, int> row_column_config)
 {
     this.mRowColumnConfig = row_column_config;
     this.mChipsList       = new ChipsList();
 }