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. }
public void performNextIteration() { currentPiece = pieceGenerator.getRandomPiece(); pieceController.setCurrentTetrisPiece(currentPiece); }