예제 #1
0
        private void Program_Indicator_Tick(object sender, EventArgs e)
        {
            if (heuristics.get_TimerController() == true)
            {
                if (useUI)
                {
                    UI_Drawer_Int("현재높이", heuristics.get_Height(), label_Height);

                    UI_Drawer_Int("빈공간", heuristics.get_Empty_Space(), label_Empty);
                }


                /*블록 평가 */
                heuristics.set_Matrix(mapping.get_Matrix());
                heuristics.Evaluate_Block_Relevance(Current_Block, mapping.get_Matrix());

                label_Adjacent.Text = null;
                /*UI 부분 업로드*/
                if (useUI)
                {
                    for (int j = 0; j < heuristics.get_Under_Blocks().Length / 12; j++)
                    {
                        label_Adjacent.Text = label_Adjacent.Text + "밀착 공간(아래, 회전수" + j + ")";
                        for (int i = 0; i < width / Interval; i++)
                        {
                            label_Adjacent.Text = label_Adjacent.Text + " " + heuristics.get_Under_Blocks()[j, i];
                        }
                        label_Adjacent.Text = label_Adjacent.Text + "\n";
                    }
                    try
                    {
                        UI_Drawer("평균높이", heuristics.get_Average_Height(), label_AverageHeight, true);
                        UI_Drawer("미래 평균높이", heuristics.get_Heuristics_Height(), label_FutureHeight, true);


                        /*UI 부분 업로드*/
                        label_H_Difference.Text = "평균 높이차";
                        for (int i = 0; i < width / Interval; i++)
                        {
                            label_H_Difference.Text = label_H_Difference.Text + " " + (heuristics.get_Heuristics_Height()[i] - heuristics.get_Average_Height()[i]);
                        }
                    }
                    catch (NullReferenceException E)
                    {
                        Console.WriteLine(E.Message);
                    }
                }


                trial = true;
                heuristics.set_TimerController(false);
            }
            if (trial == false)
            {
                return;
            }
            AI_Manuplate();
        }
예제 #2
0
        public char init_Character(int Order, int x)
        {
            int y = 0;

            user[0]  = x;
            user[1]  = y;
            Figure   = Order;
            flow     = false;
            Rotation = 0;

            if (Tower_Height <= 0)
            {
                return(GameOver);
            }

            character = form.Create_Block_Form(Order, x, 0);
            Create(CharacterColor);
            heuristics.set_TimerController(true);
            return(Color_Form[Order]);
        }