Esempio n. 1
0
        public Heuristics(int numWidth, int numHeight, CalculationNetwork calculator)
        {
            form            = new Formator();
            Color_Form      = form.get_Color_Form();
            Figure_Form     = form.get_Figure_Form();
            Height_info     = new int[numWidth];
            BlockEmpty      = new int[numWidth];
            Under_Blocks    = new int[4, numWidth];
            Heuristic_Value = new double[numWidth];
            Side_Block      = new double[numWidth];

            Weight     = calculator.get_weight();
            Calculator = calculator;
            Width      = numWidth;
            Height     = numHeight;
        }
Esempio n. 2
0
        bool Line_swap        = false;//use in busy waiting

        /*
         * 캐릭터 좌표는 반드시 0,0이 가장 아래쪽에 오도록 구현할것.
         *
         */


        public Mapping(Heuristics H_temp, int Width, int Height)
        {
            heuristics   = H_temp;
            numWidth     = Width;
            numHeight    = Height;
            Tower_Height = numHeight;
            Score        = 0;
            form         = new Formator();
            Color_Form   = form.get_Color_Form();
            Figure_Form  = form.get_Figure_Form();
            Matrix       = new char[numHeight, numWidth];
            for (int i = 0; i < numHeight; i++)
            {
                for (int j = 0; j < numWidth; j++)
                {
                    Matrix[i, j] = empty;
                }
            }
            Rotation = 0;//회전 값 초기화.
        }