Exemplo n.º 1
0
    public override void Init(Color color)
    {
        Color = color;

        Step.setConstsFor(color);

        DefaultConstraints.SetupBuildDefaults();
        move = new Or(
            new Step(Step.RIGHT_FORWARD),
            new Step(Step.RIGHT_BACKWARD),
            new Step(Step.LEFT_BACKWARD),
            new Step(Step.LEFT_FORWARD),

            new Step(2f * Step.RIGHT_BACKWARD),
            new Step(2f * Step.RIGHT_FORWARD),
            new Step(2f * Step.LEFT_BACKWARD),
            new Step(2f * Step.LEFT_FORWARD),

            new Step(Step.TRIAGONAL_DOWN_LEFT_BACKWARD),
            new Step(Step.TRIAGONAL_DOWN_LEFT_FORWARD),
            new Step(Step.TRIAGONAL_DOWN_RIGHT_BACKWARD),
            new Step(Step.TRIAGONAL_DOWN_RIGHT_FORWARD),
            new Step(Step.TRIAGONAL_UP_LEFT_BACKWARD),
            new Step(Step.TRIAGONAL_UP_LEFT_FORWARD),
            new Step(Step.TRIAGONAL_UP_RIGHT_BACKWARD),
            new Step(Step.TRIAGONAL_UP_RIGHT_FORWARD)
            ).AddConstraint(new StartLevelConstraint(2));

        DefaultConstraints.SetupBuildDefaults(new BlockAllyAndVoidCapture());
        capture = move.Clone();

        addBasicConstraints();
    }
Exemplo n.º 2
0
        public void CloneTest()
        {
            var exp   = new Or(new Bool(true), new Bool(false));
            var clone = exp.Clone();

            Assert.Equal(exp, clone);
        }
Exemplo n.º 3
0
        public void CloneTest()
        {
            var lessThen    = new LessThan(Variable.X, new Number(10));
            var greaterThen = new GreaterThan(Variable.X, new Number(10));
            var exp         = new Or(lessThen, greaterThen);
            var clone       = exp.Clone();

            Assert.Equal(exp, clone);
        }
Exemplo n.º 4
0
        public void CloneTest()
        {
            var parameters = new ParameterCollection()
            {
                new Parameter("x", 0)
            };
            var lessThen    = new LessThan(Variable.X, new Number(10));
            var greaterThen = new GreaterThan(Variable.X, new Number(10));
            var exp         = new Or(lessThen, greaterThen);
            var clone       = exp.Clone();

            Assert.Equal(exp, clone);
        }
Exemplo n.º 5
0
    public override void Init(Color color)
    {
        Color = color;

        DefaultConstraints.SetupBuildDefaults();
        move = new Or(
            new RoundMove().AddConstraint(new StartLevelConstraint(2)),
            new Step(Step.UP),
            new Step(Step.DOWN)
            );

        DefaultConstraints.SetupBuildDefaults(new BlockAllyAndVoidCapture());
        capture = move.Clone();

        addBasicConstraints();
    }
Exemplo n.º 6
0
    public override void Init(Color color)
    {
        Color = color;

        Step.setConstsFor(color);

        DefaultConstraints.SetupBuildDefaults();
        move = new Or(
            new UpToBorder(new Step(Step.FORWARD)),
            new UpToBorder(new Step(Step.BACKWARD)),
            new UpToBorder(new Step(Step.LEFT)),
            new UpToBorder(new Step(Step.RIGHT))
            ).AddConstraint(new StartLevelConstraint(2));

        DefaultConstraints.SetupBuildDefaults(new BlockAllyAndVoidCapture());
        capture = move.Clone();

        addBasicConstraints();
    }