Ejemplo n.º 1
0
        //
        protected void InitilizePosition()
        {
            for (int i = 0; i < 8; i++)
            {
                for (int j = 0; j < 8; j++)
                {
                    positions[i, j] = new Position();
                    positions[i, j].color = 0;
                }

            }
            positions[3, 3].color = 1;
            positions[3, 4].color = -1;
            positions[4, 3].color = -1;
            positions[4, 4].color = 1;
        }
Ejemplo n.º 2
0
        public void init()
        {
            for (int i = 0; i < 8; i++)
            {
                for (int j = 0; j < 8; j++)
                {
                    positions[i, j] = new Position();
                    positions[i, j].color = 0;
                }

            }
            positions[3, 3].color = -1;
            positions[3, 4].color = 1;
            positions[4, 3].color = 1;
            positions[4, 4].color = -1;

            DistributeWeight();

            currentPlayer = 1;
            noOfPieces = 4;
            lastPlayX = lastPlayY = -1;
        }