예제 #1
0
파일: Board.java 프로젝트: ewadav/MiniGames
  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");
    }
  }