Inheritance: SetPropertyBrick
 protected bool TestEquals(SetPositionBrick other)
 {
     return(TestEquals(_valueX, other._valueX) && TestEquals(_valueY, other._valueY));
 }
 protected bool TestEquals(SetPositionBrick other)
 {
     return TestEquals(_valueX, other._valueX) && TestEquals(_valueY, other._valueY);
 }
        private static void FillSprites(Program program)
        {
            var objectBackground = new Sprite { Name = AppResourcesHelper.Get("DefaultProgram_Background") }; 
            var objectMole1 = new Sprite { Name = AppResourcesHelper.Get("WhackAMole_Mole") + " 1" };
            var objectMole2 = new Sprite { Name = AppResourcesHelper.Get("WhackAMole_Mole") + " 2" };
            var objectMole3 = new Sprite { Name = AppResourcesHelper.Get("WhackAMole_Mole") + " 3" };
            var objectMole4 = new Sprite { Name = AppResourcesHelper.Get("WhackAMole_Mole") + " 4" };

            #region Background

            objectBackground.Looks.Add(new Look { Name = AppResourcesHelper.Get("DefaultProgram_Background"), FileName = LookFileNameBackground });
            objectBackground.Looks.Add(new Look { Name = AppResourcesHelper.Get("DefaultProgram_Background") + "End", FileName = LookFileNameBackgroundFinished });

            StartScript startScriptBackground = new StartScript();
            {
                SetLookBrick look = new SetLookBrick();
                look.Value = objectBackground.Looks[0];
                startScriptBackground.Bricks.Add(look);
            }
            {
                SetSizeBrick sizeBack = new SetSizeBrick();
                sizeBack.Percentage = FormulaTreeFactory.CreateNumberNode(75);
                startScriptBackground.Bricks.Add(sizeBack);
            }
            objectBackground.Scripts.Add(startScriptBackground);

            #endregion

            #region mole1

            objectMole1.Looks.Add(new Look { Name = AppResourcesHelper.Get("WhackAMole_MovingMole"), FileName = LookFileNameMole1 });
            objectMole1.Looks.Add(new Look { Name = AppResourcesHelper.Get("WhackAMole_DizzyMole"), FileName = LookFileNameMole2 });
            objectMole1.Looks.Add(new Look { Name = AppResourcesHelper.Get("WhackAMole_Mole"), FileName = LookFileNameMole3 });

            StartScript startScriptMole1 = new StartScript();
            {
                SetSizeBrick sizeBrick = new SetSizeBrick();
                sizeBrick.Percentage = FormulaTreeFactory.CreateNumberNode(20);
                startScriptMole1.Bricks.Add(sizeBrick);
            }
            ForeverBrick startForeverBrick1 = new ForeverBrick();
            EndForeverBrick endForeverBrick1 = new EndForeverBrick();
            startForeverBrick1.End = endForeverBrick1;
            endForeverBrick1.Begin = startForeverBrick1;

            startScriptMole1.Bricks.Add(startForeverBrick1);  
            {
                SetPositionBrick pos = new SetPositionBrick();
                pos.ValueX = FormulaTreeFactory.CreateNumberNode(-115);
                pos.ValueY = FormulaTreeFactory.CreateNumberNode(-80);
                startScriptMole1.Bricks.Add(pos);
            }
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateRandomNode(
                    firstChild: FormulaTreeFactory.CreateNumberNode(1), 
                    secondChild: FormulaTreeFactory.CreateNumberNode(2));
                startScriptMole1.Bricks.Add(wait);
            }
            startScriptMole1.Bricks.Add(new ShowBrick());
            {
                SetLookBrick look = new SetLookBrick();
                look.Value = objectMole1.Looks[0];
                startScriptMole1.Bricks.Add(look);
            }
            {
                AnimatePositionBrick slide = new AnimatePositionBrick();
                slide.Duration = FormulaTreeFactory.CreateNumberNode(0.1);
                slide.ToX = FormulaTreeFactory.CreateNumberNode(0);
                slide.ToY = FormulaTreeFactory.CreateNumberNode(10);
                startScriptMole1.Bricks.Add(slide);
            }
            {
                SetLookBrick look = new SetLookBrick();
                look.Value = objectMole1.Looks[2];
                startScriptMole1.Bricks.Add(look);
            }
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateRandomNode(
                    firstChild: FormulaTreeFactory.CreateNumberNode(1),
                    secondChild: FormulaTreeFactory.CreateNumberNode(5));  
                startScriptMole1.Bricks.Add(wait);
            }
            startScriptMole1.Bricks.Add(new HideBrick());
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateRandomNode(
                    firstChild: FormulaTreeFactory.CreateNumberNode(1),
                    secondChild: FormulaTreeFactory.CreateNumberNode(5));  
                startScriptMole1.Bricks.Add(wait);
            }
            startScriptMole1.Bricks.Add(endForeverBrick1); 
            objectMole1.Scripts.Add(startScriptMole1);

            TappedScript tappedScriptMole1 = new TappedScript();
            {
                SetLookBrick look = new SetLookBrick();
                look.Value = objectMole1.Looks[1];
                tappedScriptMole1.Bricks.Add(look);
            }
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateNumberNode(1.5);
                tappedScriptMole1.Bricks.Add(wait);     
            }
            tappedScriptMole1.Bricks.Add(new HideBrick());
            objectMole1.Scripts.Add(tappedScriptMole1);

            #endregion

            #region mole2

            objectMole2.Looks.Add(new Look { Name = AppResourcesHelper.Get("WhackAMole_MovingMole"), FileName = LookFileNameMole1 });
            objectMole2.Looks.Add(new Look { Name = AppResourcesHelper.Get("WhackAMole_DizzyMole"), FileName = LookFileNameMole2 });
            objectMole2.Looks.Add(new Look { Name = AppResourcesHelper.Get("WhackAMole_Mole"), FileName = LookFileNameMole3 });

            StartScript startScriptMole2 = new StartScript();
            {
                SetSizeBrick sizeBrick = new SetSizeBrick();
                sizeBrick.Percentage = FormulaTreeFactory.CreateNumberNode(20);
                startScriptMole2.Bricks.Add(sizeBrick);
            }
            ForeverBrick startForeverBrick2 = new ForeverBrick();
            EndForeverBrick endForeverBrick2 = new EndForeverBrick();
            startForeverBrick2.End = endForeverBrick2;
            endForeverBrick2.Begin = startForeverBrick2;

            startScriptMole2.Bricks.Add(startForeverBrick2);
            {
                SetPositionBrick pos = new SetPositionBrick();
                pos.ValueX = FormulaTreeFactory.CreateNumberNode(115);
                pos.ValueY = FormulaTreeFactory.CreateNumberNode(-80);
                startScriptMole2.Bricks.Add(pos);
            }
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateRandomNode(
                    firstChild: FormulaTreeFactory.CreateNumberNode(1),
                    secondChild: FormulaTreeFactory.CreateNumberNode(2));
                startScriptMole2.Bricks.Add(wait);
            }
            startScriptMole2.Bricks.Add(new ShowBrick());
            {
                SetLookBrick look = new SetLookBrick();
                look.Value = objectMole2.Looks[0];
                startScriptMole2.Bricks.Add(look);
            }
            {
                AnimatePositionBrick slide = new AnimatePositionBrick();
                slide.Duration = FormulaTreeFactory.CreateNumberNode(0.1);
                slide.ToX = FormulaTreeFactory.CreateNumberNode(0);
                slide.ToY = FormulaTreeFactory.CreateNumberNode(10);
                startScriptMole2.Bricks.Add(slide);
            }
            {
                SetLookBrick look = new SetLookBrick();
                look.Value = objectMole2.Looks[2];
                startScriptMole2.Bricks.Add(look);
            }
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateRandomNode(
                    firstChild: FormulaTreeFactory.CreateNumberNode(1),
                    secondChild: FormulaTreeFactory.CreateNumberNode(5));
                startScriptMole2.Bricks.Add(wait);
            }
            startScriptMole2.Bricks.Add(new HideBrick());
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateRandomNode(
                    firstChild: FormulaTreeFactory.CreateNumberNode(1),
                    secondChild: FormulaTreeFactory.CreateNumberNode(5));
                startScriptMole2.Bricks.Add(wait);
            }
            startScriptMole2.Bricks.Add(endForeverBrick2);
            objectMole2.Scripts.Add(startScriptMole2);

            TappedScript tappedScriptMole2 = new TappedScript();
            {
                SetLookBrick look = new SetLookBrick();
                look.Value = objectMole2.Looks[1];
                tappedScriptMole2.Bricks.Add(look);
            }
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateNumberNode(1.5);
                tappedScriptMole2.Bricks.Add(wait);
            }
            tappedScriptMole2.Bricks.Add(new HideBrick());
            objectMole2.Scripts.Add(tappedScriptMole2);

            #endregion

            #region mole3

            objectMole3.Looks.Add(new Look { Name = AppResourcesHelper.Get("WhackAMole_MovingMole"), FileName = LookFileNameMole1 });
            objectMole3.Looks.Add(new Look { Name = AppResourcesHelper.Get("WhackAMole_DizzyMole"), FileName = LookFileNameMole2 });
            objectMole3.Looks.Add(new Look { Name = AppResourcesHelper.Get("WhackAMole_Mole"), FileName = LookFileNameMole3 });

            StartScript startScriptMole3 = new StartScript();
            {
                SetSizeBrick sizeBrick = new SetSizeBrick();
                sizeBrick.Percentage = FormulaTreeFactory.CreateNumberNode(20);
                startScriptMole3.Bricks.Add(sizeBrick);
            }
            ForeverBrick startForeverBrick3 = new ForeverBrick();
            EndForeverBrick endForeverBrick3 = new EndForeverBrick();
            startForeverBrick3.End = endForeverBrick3;
            endForeverBrick3.Begin = startForeverBrick3;

            startScriptMole3.Bricks.Add(startForeverBrick3);
            {
                SetPositionBrick pos = new SetPositionBrick();
                pos.ValueX = FormulaTreeFactory.CreateNumberNode(-115);
                pos.ValueY = FormulaTreeFactory.CreateNumberNode(-215);
                startScriptMole3.Bricks.Add(pos);
            }
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateRandomNode(
                    firstChild: FormulaTreeFactory.CreateNumberNode(1),
                    secondChild: FormulaTreeFactory.CreateNumberNode(2));
                startScriptMole3.Bricks.Add(wait);
            }
            startScriptMole3.Bricks.Add(new ShowBrick());
            {
                SetLookBrick look = new SetLookBrick();
                look.Value = objectMole3.Looks[0];
                startScriptMole3.Bricks.Add(look);
            }
            {
                AnimatePositionBrick slide = new AnimatePositionBrick();
                slide.Duration = FormulaTreeFactory.CreateNumberNode(0.1);
                slide.ToX = FormulaTreeFactory.CreateNumberNode(0);
                slide.ToY = FormulaTreeFactory.CreateNumberNode(10);
                startScriptMole3.Bricks.Add(slide);
            }
            {
                SetLookBrick look = new SetLookBrick();
                look.Value = objectMole3.Looks[2];
                startScriptMole3.Bricks.Add(look);
            }
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateRandomNode(
                    firstChild: FormulaTreeFactory.CreateNumberNode(1),
                    secondChild: FormulaTreeFactory.CreateNumberNode(5));
                startScriptMole3.Bricks.Add(wait);
            }
            startScriptMole3.Bricks.Add(new HideBrick());
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateRandomNode(
                    firstChild: FormulaTreeFactory.CreateNumberNode(1),
                    secondChild: FormulaTreeFactory.CreateNumberNode(5));
                startScriptMole3.Bricks.Add(wait);
            }
            startScriptMole3.Bricks.Add(endForeverBrick3);
            objectMole3.Scripts.Add(startScriptMole3);

            TappedScript tappedScriptMole3 = new TappedScript();
            {
                SetLookBrick look = new SetLookBrick();
                look.Value = objectMole3.Looks[1];
                tappedScriptMole3.Bricks.Add(look);
            }
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateNumberNode(1.5);
                tappedScriptMole3.Bricks.Add(wait);
            }
            tappedScriptMole3.Bricks.Add(new HideBrick());
            objectMole3.Scripts.Add(tappedScriptMole3);

            #endregion

            #region mole4

            objectMole4.Looks.Add(new Look { Name = AppResourcesHelper.Get("WhackAMole_MovingMole"), FileName = LookFileNameMole1 });
            objectMole4.Looks.Add(new Look { Name = AppResourcesHelper.Get("WhackAMole_DizzyMole"), FileName = LookFileNameMole2 });
            objectMole4.Looks.Add(new Look { Name = AppResourcesHelper.Get("WhackAMole_Mole"), FileName = LookFileNameMole3 });

            StartScript startScriptMole4 = new StartScript();
            {
                SetSizeBrick sizeBrick = new SetSizeBrick();
                sizeBrick.Percentage = FormulaTreeFactory.CreateNumberNode(20);
                startScriptMole4.Bricks.Add(sizeBrick);
            }
            ForeverBrick startForeverBrick4 = new ForeverBrick();
            EndForeverBrick endForeverBrick4 = new EndForeverBrick();
            startForeverBrick4.End = endForeverBrick4;
            endForeverBrick4.Begin = startForeverBrick4;

            startScriptMole4.Bricks.Add(startForeverBrick4);
            {
                SetPositionBrick pos = new SetPositionBrick();
                pos.ValueX = FormulaTreeFactory.CreateNumberNode(115);
                pos.ValueY = FormulaTreeFactory.CreateNumberNode(-215);
                startScriptMole4.Bricks.Add(pos);
            }
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateRandomNode(
                    firstChild: FormulaTreeFactory.CreateNumberNode(1),
                    secondChild: FormulaTreeFactory.CreateNumberNode(2));
                startScriptMole4.Bricks.Add(wait);
            }
            startScriptMole4.Bricks.Add(new ShowBrick());
            {
                SetLookBrick look = new SetLookBrick();
                look.Value = objectMole4.Looks[0];
                startScriptMole4.Bricks.Add(look);
            }
            {
                AnimatePositionBrick slide = new AnimatePositionBrick();
                slide.Duration = FormulaTreeFactory.CreateNumberNode(0.1);
                slide.ToX = FormulaTreeFactory.CreateNumberNode(0);
                slide.ToY = FormulaTreeFactory.CreateNumberNode(10);
                startScriptMole4.Bricks.Add(slide);
            }
            {
                SetLookBrick look = new SetLookBrick();
                look.Value = objectMole4.Looks[2];
                startScriptMole4.Bricks.Add(look);
            }
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateRandomNode(
                    firstChild: FormulaTreeFactory.CreateNumberNode(1),
                    secondChild: FormulaTreeFactory.CreateNumberNode(5));
                startScriptMole4.Bricks.Add(wait);
            }
            startScriptMole4.Bricks.Add(new HideBrick());
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateRandomNode(
                    firstChild: FormulaTreeFactory.CreateNumberNode(1),
                    secondChild: FormulaTreeFactory.CreateNumberNode(5));
                startScriptMole4.Bricks.Add(wait);
            }
            startScriptMole4.Bricks.Add(endForeverBrick4);
            objectMole4.Scripts.Add(startScriptMole4);

            TappedScript tappedScriptMole4 = new TappedScript();
            {
                SetLookBrick look = new SetLookBrick();
                look.Value = objectMole4.Looks[1];
                tappedScriptMole4.Bricks.Add(look);
            }
            {
                DelayBrick wait = new DelayBrick();
                wait.Duration = FormulaTreeFactory.CreateNumberNode(1.5);
                tappedScriptMole4.Bricks.Add(wait);
            }
            tappedScriptMole4.Bricks.Add(new HideBrick());
            objectMole4.Scripts.Add(tappedScriptMole4);

            #endregion

            program.Sprites.Add(objectBackground);
            program.Sprites.Add(objectMole1);
            program.Sprites.Add(objectMole2);
            program.Sprites.Add(objectMole3);
            program.Sprites.Add(objectMole4);
        }