Esempio n. 1
0
        public eda()
        {
            block = new gameBlock();
            Random rand = controller.rand;

            block.x = controller.rand.Next(controller.client.Width / controller.kletka.width);
            block.y = controller.rand.Next(controller.client.Height / controller.kletka.height);
            color   = new SolidBrush(Color.FromArgb(rand.Next(255), rand.Next(255), rand.Next(255)));
        }
Esempio n. 2
0
        public zmeya()
        {
            golova = new gameBlock();
            hvost  = new gameBlock();
            Random rand = controller.rand;

            golova.x = controller.rand.Next(controller.client.Width / controller.kletka.width);
            golova.y = controller.rand.Next(controller.client.Height / controller.kletka.height);
            hvost.x  = golova.x - 1;
            hvost.y  = golova.y;
            telo     = new List <gameBlock>();
            color    = new SolidBrush(Color.FromArgb(rand.Next(255), rand.Next(255), rand.Next(255)));
        }