using System; using System.Drawing; using System.Windows.Forms; public class Form1 : Form { [STAThread] static void Main() { Application.Run( new Form1() ); } Font arial18 = new Font( "Arial", 18 ); Brush whitebrush = SystemBrushes.Window; Pen blackpen = new Pen( Color.Black, 2 ); Point[] boden = new Point[70]; Random rand = new Random(); int anzahl = 0; Boolean hoch = true; Graphics g, bitmap_g; Bitmap bitmap; public Form1() { BackColor = Color.White; Text = "intro1"; SetStyle( ControlStyles.ResizeRedraw, true ); StartPosition = FormStartPosition.Manual; Top = 50; Left = 50; Width = 350; Height = 232; } void initBoden() { boden[0].Y = 200; boden[0].X = 0; for (int i=1;i<70;i++) { boden[i].X = i*5; naechsterPunkt(i); } } void naechsterPunkt(int index) { if (boden[index-1].Y==200) { boden[index].Y = 195; hoch = true; } else { if (boden[index-1].Y==150) { boden[index].Y = 155; hoch = false; } else { int r; r = rand.Next(100); if (r>90) hoch = !hoch; if (hoch) boden[index].Y = boden[index-1].Y-5; else boden[index].Y = boden[index-1].Y+5; } } } void zeichneBoden(Graphics g) { for (int i = 1;i