Package Tetris.Structures

Examples of Tetris.Structures.Block


   
    gameGrid = new Grid(false);
    gameGrid.setBounds(150, 10, 305, 600);
    this.add(gameGrid);
   
    gameBlock = new Block(gameGrid);
   
    inQueueGrid = new Grid[QUEUE_SIZE];
    inQueueBlock = new Block[QUEUE_SIZE];
   
    JLabel
    nextLabel = new JLabel("Next");
    nextLabel.setForeground(Program.foreground);
    nextLabel.setHorizontalAlignment(SwingConstants.CENTER);
    nextLabel.setFont(Program.displayFont(Font.BOLD, 15));
    nextLabel.setBounds(480, 20, 100, 40);
    this.add(nextLabel);
   
    for (int i = 0; i < QUEUE_SIZE; ++i) {
      inQueueGrid[i] = new Grid(true);
      inQueueGrid[i].setBounds(480, 70 + 110 * i, 100, 100);
      this.add(inQueueGrid[i]);
     
      inQueueBlock[i] = new Block((inQueueGrid[i]));
    }
   
    MainFrame.setGamePanel(this);
    fallTimer.start();
  }
View Full Code Here


      inQueueBlock[i - 1] = inQueueBlock[i];
      inQueueBlock[i - 1].insert(inQueueGrid[i - 1]);
    }
   
    // Insert a new block at the tail of the queue
    inQueueBlock[QUEUE_SIZE - 1] = new Block(inQueueGrid[QUEUE_SIZE - 1]);
    return true;
  }
View Full Code Here

    }
   
    game.fallTimer.stop();
   
    if (holdBlock != null) {
      Block temp = gameBlock;
     
      gameBlock = holdBlock;
      holdBlock = temp;
     
      gameBlock.freeGrid();
View Full Code Here

TOP

Related Classes of Tetris.Structures.Block

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.