Ejemplo n.º 1
0
    static void Main(string[] args)
    {
        var testBoard = new MiniCactpot();

        //MiniCactpot.LoadValueStore();
        //testBoard.Choose(0, 4);
        //Console.WriteLine("Max: " + testBoard.BoardValue);
        for (int i = 0; i < testBoard.CactpotSquares.Length; i++)
        {
            Console.WriteLine("{0}: {1}", i, testBoard.ChosenSquareValue(i));
        }
        //MiniCactpot.SaveValueStore();
        Console.ReadLine();
    }
Ejemplo n.º 2
0
        private void HighlightMaxChoice()
        {
            Label  maxLabel = lblVal0;
            double maxVal   = 0;

            Label[] labels = { lblVal0, lblVal1, lblVal2, lblVal3, lblVal4, lblVal5, lblVal6, lblVal7, lblVal8 };
            for (int i = 0; i < labels.Length; i++)
            {
                labels[i].BackColor = SystemColors.Control;
                var choiceVal = _cactpot.ChosenSquareValue(i);
                labels[i].Text    = Math.Round(choiceVal).ToString();
                labels[i].Visible = true;
                if (choiceVal > maxVal)
                {
                    maxLabel = labels[i];
                    maxVal   = choiceVal;
                }
            }
            maxLabel.BackColor = Color.LightGreen;
        }