示例#1
0
 private void btnDemo_Click(object sender, RoutedEventArgs e)
 {
     for (int i = 0; i < 3; i++)
     {
         for (int side = 0; side < 4; side++)
         {
             tess.Forward(100);
             tess.Right(90);
         }
         tess.Right(20);
     }
     MessageBox.Show(tess.ToString());
 }
示例#2
0
        private void btnInterfaces_Click(object sender, RoutedEventArgs e)
        {
            TurtleGTX alex = new TurtleGTX(playground, 100, 100);
            TurtleGTX dave = new TurtleGTX(playground, 200, 200);

            TurtleGTX[] xs = { alex, dave };

            alex.Forward(80);
            dave.Forward(40);

            Array.Sort(xs);
        }