Skip to content

Commit

Permalink
Feat: Rebalancing/timing for minigames
Browse files Browse the repository at this point in the history
Reduced time for minigames, and increased amount of points gained to compensate.
  • Loading branch information
tommyah committed May 24, 2026
1 parent 5253d19 commit 8888d44
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ public final class GameEngineController extends ViewController<GameEngineView> {
/**
* Current score.
* */
private int currentScore = 0;
private int currentScore;

/**
* Current frame for animation loop.
* */
private int frameCounter = 0;
private int frameCounter;

/**
* Current seconds remaining before minigame
* is over.
* */
private int secondsRemaining = 60;
private int secondsRemaining;

/**
* Current rank the player has for this minigame.
* */
private char currentRank = 'E';
private char currentRank;

/**
* String shown to describe the effect of the game,
Expand Down Expand Up @@ -119,7 +119,7 @@ public void launchGimmickSession(final GameGimmick gimmick) {
frameCounter = 0;
currentRank = 'E';
reportActive = false;
secondsRemaining = 60;
secondsRemaining = 20;
refreshMetrics();

getViewElement().setGameGimmickContent(gimmick, (scoreDelta) -> {
Expand Down Expand Up @@ -149,27 +149,27 @@ private void refreshMetrics() {
int seconds = secondsRemaining % 60;
String formattedTime = String.format("%02d:%02d:%02d", hours, minutes, seconds);

if (currentScore > 400) {
if (currentScore > 150) {
currentRank = 'S';
rankEffectString = "Extremely good fortune awaits " + chosenStock.getSymbol();
fortuneToSet = 0.10;

} else if (currentScore > 300) {
} else if (currentScore > 120) {
currentRank = 'A';
rankEffectString = "Really good fortune awaits " + chosenStock.getSymbol();
fortuneToSet = 0.5;

} else if (currentScore > 200) {
} else if (currentScore > 80) {
currentRank = 'B';
rankEffectString = "Good fortune awaits " + chosenStock.getSymbol();
fortuneToSet = 0.2;

} else if (currentScore > 150) {
} else if (currentScore > 50) {
currentRank = 'C';
rankEffectString = "Bad fortune awaits " + chosenStock.getSymbol();
fortuneToSet = -0.2;

} else if (currentScore > 100) {
} else if (currentScore > 20) {
currentRank = 'D';
rankEffectString = "Really bad fortune awaits " + chosenStock.getSymbol();
fortuneToSet = -0.5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ private void generateRound() {
* */
private void handleChoice(final String chosen) {
if (chosen.equals(targetSymbol)) {
scoreModifier.accept(2);
scoreModifier.accept(14);
} else {
scoreModifier.accept(-1);
scoreModifier.accept(-7);
}
generateRound();
}
Expand Down

0 comments on commit 8888d44

Please sign in to comment.