Modified drawReceiptScreen to fetch values from RoundState and display each bonus, along with the base coin at the top, followed by the total coins earned in the current round.
Adjusted the ScoreScreen to avoid overwhelming text by not showing individual bonus coins. Instead, if it’s GameOver, a message will be displayed under the GameOver text stating that bonuses from this round were lost.
Fixed a minor bug where if no bullets were fired and the game ended, accuracy showed as NaN%. Now, a specific message is displayed in this case.
ScoreScreen.java
Removed logic that adjusts height based on whether a new record was set. Now, the GameClear message will always appear at a consistent position for simplicity and clarity.
RoundState.java
Split the calculateCoin method into base coins and bonus parts.
Added private final variables for bonuses and base coins, initialized via methods in the constructor. Added getter methods for these values, now used in DrawManager.
Screenshots
If bonuses are not awarded, no message is displayed.
A message is shown in the GameOver screen stating that bonuses were lost.
If no shots were fired, a message stating this is displayed instead of NaN%.
Consistent positioning of the GameClear message, regardless of whether a new record was set.
Changes
DrawManager.java
drawReceiptScreen
to fetch values fromRoundState
and display each bonus, along with the base coin at the top, followed by the total coins earned in the current round.ScoreScreen
to avoid overwhelming text by not showing individual bonus coins. Instead, if it’s GameOver, a message will be displayed under the GameOver text stating that bonuses from this round were lost.accuracy
showed as NaN%. Now, a specific message is displayed in this case.ScoreScreen.java
GameClear
message will always appear at a consistent position for simplicity and clarity.RoundState.java
calculateCoin
method into base coins and bonus parts.DrawManager
.Screenshots
If bonuses are not awarded, no message is displayed.
A message is shown in the GameOver screen stating that bonuses were lost.
If no shots were fired, a message stating this is displayed instead of NaN%.
Consistent positioning of the
GameClear
message, regardless of whether a new record was set.