Use strategical then tactical DDD patterns to create the Tetris game.
Core domain responsible for the board aggregate which contains all tetrominos.
Supporting domain responsible for the game lyfecycle.
Supporting domain responsible for the next round in our case generating the next tetromino.
Supporting domain responsible for computing the tetris score.
It's interesting to notice that tetromino model is different between the bounded contexts. The executing context will need coordinates but not the preparing context which needs only the shape. The shared model is explicitly put in the shared directory.
I use javafx framework for the UI. The UI is built to react with all the domain events. To start the game just execute:
mvn clean javafx:run