Example #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            Random random = new Random();
            int    i = 0, j = 3;

            //Form1_Paint(null,null);
            Invalidate();

            do
            {
                Mainfunction Basemain = new Mainfunction(random.Next(1, 7));

                Basemain.put(ref map, i, j);
                i++;
            }while(check)


            checked ();
        }
Example #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            Random random = new Random();



            if (block[0, 0] == -1)
            {
                tile       = new Mainfunction(random.Next(1, 7));
                this.block = tile.mainB;
            }

            int check = tile.check(map, time, move, bottom);

            if (check == 2)
            {
                tile.put(ref map, time, move);
                block[0, 0] = -1;
                time        = 0;
                bottom      = 0;
            }
            else if (check == 1)
            {
                bottom++;
                time++;
            }
            else
            {
                bottom = 0;
                time++;
            }



            //Form1_Paint(null,null);
            Invalidate();
        }