Exemplo n.º 1
0
        public Match FindMatch(Color col)
        {
            Match CurrentWinner = new Match();

            CurrentWinner.NewMatch(new Colour("", Color.Black, 0, 0, true, ""), int.MaxValue);
            for (int i = 0; i < Colours.Count; ++i)
            {
                int dif = Colours[i].Difference(col);
                if (dif < CurrentWinner.BestDif && Colours[i].Enabled)
                {
                    CurrentWinner.NewMatch(Colours[i], dif);
                }
            }
            return(CurrentWinner);
        }
Exemplo n.º 2
0
 public Match FindMatch(Color col)
 {
     Match CurrentWinner = new Match();
     CurrentWinner.NewMatch(new Colour("",Color.Black,0,0,true,""),int.MaxValue);
     for (int i = 0; i < Colours.Count; ++i)
     {
         int dif = Colours[i].Difference(col);
         if (dif < CurrentWinner.BestDif && Colours[i].Enabled)
         {
             CurrentWinner.NewMatch(Colours[i], dif);
         }
     }
     return CurrentWinner;
 }