예제 #1
0
 private static void ParseFlowerColors(string[][] data)
 {
     foreach (string[] item in data)
     {
         if (item.Length < 3)
         {
             throw new InputException("Flower color must contain ID and a pair of coordinates");
         }
         string id = item[0];
         if (flowerColors.ContainsKey(id))
         {
             throw new RegistryException("Flower Color", id);
         }
         flowerColors[id] = new FlowerColor(id, int.Parse(item[1]), int.Parse(item[2]));
     }
 }
 public void AddTestResult(FlowerColor color, int chance)
 {
     results.Add(new TestPairResult(color, chance));
 }
 public TestPairResult(FlowerColor color, int chance)
 {
     this.Color  = color;
     this.Chance = chance;
 }