示例#1
0
  private void newPiece() {
    curPiece.setRandomShape();
    curX = BoardWidth / 2 + 1;
    curY = BoardHeight - 1 + curPiece.minY();

    if (!tryMove(curPiece, curX, curY)) {
      curPiece.setShape(Tetrominoes.NoShape);
      timer.stop();
      isStarted = false;
      statusbar.setText("Game Over");
    }
  }