示例#1
0
  public void startGame() {
    hasStarted = true;

    // reset grid
    gridManager.clearGrid();

    // generate random piece
    currentPiece = pieceGenerator.getRandomPiece();

    // set pieceController to currentPiece
    pieceController.setCurrentTetrisPiece(currentPiece);

    pieceController.placeCurrentTetrisPieceAt(2, 2);

    // other stuff like clearing levels and score.
  }
示例#2
0
 public void performNextIteration() {
   currentPiece = pieceGenerator.getRandomPiece();
   pieceController.setCurrentTetrisPiece(currentPiece);
 }