java.lang.NullPointerException was thrown when the pieces fill the playing field. And the "game over" page will not be shown as expected. The exception was caused by the wrong logic. To solve this exception, we swap the following two lines of code. this.logicTimer = new Clock(gameSpeed); pc = new PieceController(this);