Ejemplo n.º 1
0
        public void print()
        {
            if (active != null)
            {
                if (active != null && active.piece.okDown(this))
                {
                    goDown = true;
                    mainScreen.timer2.Stop();
                    mainScreen.help = 0;
                    return;
                }

                for (int i = 0; i < 4; i++)
                {
                    Point block = active.piece.blocks[i].getLoc();
                    if (block.X >= 0 && block.X <= 9 && block.Y >= 0 && block.Y <= 19)
                    {
                        bg.matrix[block.X, block.Y] = active.piece.blocks[i].num;
                    }
                }

                this.active = new activePiece(rnd);
                this.checkGameOver();
                this.goDown = true;
                mainScreen.timer2.Stop();

                mainScreen.ap[0].Location = new Point(-1, -1);
                mainScreen.ap[1].Location = new Point(-1, -1);
                mainScreen.ap[2].Location = new Point(-1, -1);
                mainScreen.ap[3].Location = new Point(-1, -1);
            }
        }
Ejemplo n.º 2
0
 public tetrixGame()
 {
     rnd             = new myRandom();
     bg              = new tetrixMatrix();
     active          = new activePiece(rnd);
     goDown          = true;
     this.Tetrissing = true;
     this.finished   = 0;
 }