Beispiel #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            a = 200;
            x = ClientRectangle.Width / 2;
            y = ClientRectangle.Height / 2;
            Graphics g = CreateGraphics();

            timer1.Start();
            bb.Postavi(x, y, a);
            bb.Crtaj(g);
        }
Beispiel #2
0
        private void Randomiser()
        {
            int x = r.Next(ClientRectangle.Width);
            int y = r.Next(ClientRectangle.Height);

            bb1 = new BB8();
            bb1.Postavi(x, y, a);

            x   = r.Next(ClientRectangle.Width);
            y   = r.Next(ClientRectangle.Height);
            bb2 = new BB8();
            bb2.Postavi(x, y, a);

            x   = r.Next(ClientRectangle.Width);
            y   = r.Next(ClientRectangle.Height);
            bb3 = new BB8();
            bb3.Postavi(x, y, a);

            x   = r.Next(ClientRectangle.Width);
            y   = r.Next(ClientRectangle.Height);
            bb4 = new BB8();
            bb4.Postavi(x, y, a);

            x   = r.Next(ClientRectangle.Width);
            y   = r.Next(ClientRectangle.Height);
            bb5 = new BB8();
            bb5.Postavi(x, y, a);

            x   = r.Next(ClientRectangle.Width);
            y   = r.Next(ClientRectangle.Height);
            bb6 = new BB8();
            bb6.Postavi(x, y, a);

            x   = r.Next(ClientRectangle.Width);
            y   = r.Next(ClientRectangle.Height);
            bb7 = new BB8();
            bb7.Postavi(x, y, a);

            x   = r.Next(ClientRectangle.Width);
            y   = r.Next(ClientRectangle.Height);
            bb8 = new BB8();
            bb8.Postavi(x, y, a);

            x   = r.Next(ClientRectangle.Width);
            y   = r.Next(ClientRectangle.Height);
            bb9 = new BB8();
            bb9.Postavi(x, y, a);

            x    = r.Next(ClientRectangle.Width);
            y    = r.Next(ClientRectangle.Height);
            bb10 = new BB8();
            bb10.Postavi(x, y, a);
        }