Exemplo n.º 1
0
        // --- Overrides:
        protected override void add_moves()
        {
            Move     tempMove  = new Move();
            MovePart tempMove1 = new MovePart();
            MovePart tempMove2 = new MovePart();

            for (int i = 1; i < Chessboard.MAX; i++)
            {
                // Up + Right:
                tempMove1.update(Direction.UP, i);
                tempMove2.update(Direction.RIGHT, i);
                tempMove.update(tempMove1, tempMove2);
                movements.Add(tempMove);

                // Up + Left:
                tempMove1.update(Direction.UP, i);
                tempMove2.update(Direction.LEFT, i);
                tempMove.update(tempMove1, tempMove2);
                movements.Add(tempMove);

                // Down + Right:
                tempMove1.update(Direction.DOWN, i);
                tempMove2.update(Direction.RIGHT, i);
                tempMove.update(tempMove1, tempMove2);
                movements.Add(tempMove);

                // Down + Left:
                tempMove1.update(Direction.DOWN, i);
                tempMove2.update(Direction.LEFT, i);
                tempMove.update(tempMove1, tempMove2);
                movements.Add(tempMove);
            }
        }
Exemplo n.º 2
0
        // --- Overrides:
        protected override void add_moves()
        {
            Move     tempMove  = new Move();
            MovePart tempMove1 = new MovePart();
            MovePart tempMove2 = new MovePart();

            tempMove1.update(Direction.UP, 2);
            tempMove2.update(Direction.RIGHT, 1);
            tempMove.update(tempMove1, tempMove2);
            movements.Add(tempMove);

            tempMove1.update(Direction.UP, 2);
            tempMove2.update(Direction.LEFT, 1);
            tempMove.update(tempMove1, tempMove2);
            movements.Add(tempMove);

            tempMove1.update(Direction.RIGHT, 2);
            tempMove2.update(Direction.UP, 1);
            tempMove.update(tempMove1, tempMove2);
            movements.Add(tempMove);

            tempMove1.update(Direction.RIGHT, 2);
            tempMove2.update(Direction.DOWN, 1);
            tempMove.update(tempMove1, tempMove2);
            movements.Add(tempMove);

            tempMove1.update(Direction.DOWN, 2);
            tempMove2.update(Direction.RIGHT, 1);
            tempMove.update(tempMove1, tempMove2);
            movements.Add(tempMove);

            tempMove1.update(Direction.DOWN, 2);
            tempMove2.update(Direction.LEFT, 1);
            tempMove.update(tempMove1, tempMove2);
            movements.Add(tempMove);

            tempMove1.update(Direction.LEFT, 2);
            tempMove2.update(Direction.UP, 1);
            tempMove.update(tempMove1, tempMove2);
            movements.Add(tempMove);

            tempMove1.update(Direction.LEFT, 2);
            tempMove2.update(Direction.DOWN, 1);
            tempMove.update(tempMove1, tempMove2);
            movements.Add(tempMove);
        }