Bug 431 - java.lang.NullPointerException was thrown when the pieces fill the playing field.
Summary: java.lang.NullPointerException was thrown when the pieces fill the playing fi...
Status: RESOLVED INVALID
Alias: None
Product: Group16_Tetris Fighter
Classification: Unclassified
Component: GameController (show other bugs)
Version: V1
Hardware: All All
: High critical
Assignee: Ashley
URL:
Depends on:
Blocks:
 
Reported: 2020-11-22 15:27 HKT by Ashley
Modified: 2020-11-24 22:32 HKT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ashley 2020-11-22 15:27:52 HKT
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);