Exemple #1
0
 void DrawSection(Turtle t, int p)
 {
     t.Forward(10);
     t.StoreTurtlePosition();
     t.Rotate(-45);
     t.Forward(p);
     t.RestoreTurtlePosition();
     t.Rotate(45);
     t.Forward(p);
     t.RestoreTurtlePosition(true);
 }
Exemple #2
0
        /// <summary>
        /// This is the place to put your turtle code
        /// </summary>
        public Turtle ToExecute()
        {
            Turtle t = new Turtle();

            t.Rotate(-90);
            for (int i = 0; i < 6; i++)
            {
                t.StoreTurtlePosition();
                for (int e = 0; e < 20; e++)
                {
                }
                {
                    DrawSection(t, 100);
                }
                t.RestoreTurtlePosition();
                t.Rotate(60);
            }


            t.StoreTurtlePosition();



            return(t);
        }
Exemple #3
0
 void cross(byte size)
 {
     t.Rotate(0, true);
     t.StoreTurtlePosition();
     t.Rotate(-45, true);
     t.Forward(size);
     t.RestoreTurtlePosition(false);
     t.Rotate(-135, true);
     t.Forward(size);
     t.RestoreTurtlePosition(false);
     t.Rotate(135, true);
     t.Forward(size);
     t.RestoreTurtlePosition(false);
     t.Rotate(45, true);
     t.Forward(size);
     t.RestoreTurtlePosition(true);
 }
Exemple #4
0
        void DrawSection(Turtle t, int p)
        {
            for (int i = 0; i < 10; i++)
            {
                t.Forward(2);

                t.SetColor(90 + i * 15, 170, 200);
            }
            t.StoreTurtlePosition();
            t.Rotate(-45);
            for (int i = 0; i < p; i++)
            {
                t.Forward(1);
                t.SetColor(i + 100, 0, 0);
            }
            t.SetColor(90, 170, 200);
            t.RestoreTurtlePosition();
            t.Rotate(45);
            t.Forward(p);
            t.RestoreTurtlePosition(true);
        }
Exemple #5
0
        /// <summary>
        /// This is the place to put your turtle code
        /// </summary>
        public Turtle ToExecute()
        {
            Turtle t = new Turtle(true);

            t.BackgroundColor = "Black";
            t.Rotate(-90);
            t.TurtleSpeed = 15;
            for (int i = 0; i < 6; i++)
            {
                t.StoreTurtlePosition();

                for (int j = 0; j < 20; j++)
                {
                    DrawSection(t, 100 - 5 * j);
                }

                t.RestoreTurtlePosition();
                t.Rotate(60);
                t.CaptureScreenshot();
            }
            return(t);
        }
Exemple #6
0
 void RestPos()
 {
     t.RestoreTurtlePosition(true);
 }