Skip to content

Arcade Bonus Mode Implementation#216

Open
amorris13 wants to merge 5 commits into
masterfrom
arcade-bonus-mode-17888960947768524627
Open

Arcade Bonus Mode Implementation#216
amorris13 wants to merge 5 commits into
masterfrom
arcade-bonus-mode-17888960947768524627

Conversation

@amorris13

@amorris13 amorris13 commented Mar 28, 2026

Copy link
Copy Markdown
Owner

Added a new 'Bonus' style to Arcade mode where each triple found grants extra time (5s for first 5, 4s for next 5, etc.).
Key changes:

  • Timer.java: Added modifyTime() method.
  • ArcadeGame.java: Added ArcadeStyle enum and override recordFoundTriple to apply bonuses.
  • DBAdapter.java: Incremented to version 9, added arcade_style column.
  • cloud save: Updated ProtoBuf and Serializer to track Arcade style.
  • MainActivity: Replaced single Arcade New Game button with Fixed/Bonus options.
  • Statistics: Added style filter to Arcade stats.
  • Tests: Added ArcadeStatisticsTest (currently failing during filtering verification).

Fixes #213


PR created automatically by Jules for task 17888960947768524627 started by @amorris13

Summary by CodeRabbit

  • New Features

    • Two Arcade modes (Fixed, Bonus); new split buttons to start either, resume label shows mode, and stats UI includes a style selector. Bonus mode changes timing, analytics labeling, achievements, and leaderboards; mode is saved/restored.
  • Bug Fixes

    • Board reshuffles/reset correctly after found triples. Resume/new-game visibility and resume formatting improved.
  • Tests

    • Added/updated tests for Fixed and Bonus navigation and style-filtered statistics.
  • Chores

    • Data persistence, cloud save, and statistics queries updated to include mode; DB schema migrated.

- Implemented 'Bonus' arcade style where triples grant extra time.
- Updated Timer to allow time modifications.
- Modified ArcadeGame to handle bonus logic and deck reshuffling.
- Updated DBAdapter (v9) and ProtoBuf definitions for persistence and cloud sync.
- Redesigned MainActivity UI to offer Fixed and Bonus arcade options.
- Enhanced Statistics with style filtering.
- Added ArcadeStatisticsTest (debugging filtering logic).

Stuck on: ArcadeStatisticsTest is currently failing (returning 0 games instead of 2). I attempted to refactor the filtering logic in Statistics.java multiple times to ensure compatibility with Iterables and List types, but the filter still seems to exclude the games in the test environment.

Co-authored-by: amorris13 <4523811+amorris13@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Mar 28, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new Arcade "Bonus" style and wires it through UI, game logic, persistence, stats, analytics/achievements/leaderboard, timer API, and tests; includes DB/proto/cloud schema updates and selector UI for filtering by style.

Changes

Cohort / File(s) Summary
Arcade core & timer
app/src/main/java/com/antsapps/triples/backend/ArcadeGame.java, app/src/main/java/com/antsapps/triples/backend/Timer.java
Introduce ArcadeStyle enum (FIXED, BONUS), style-aware factories/constructors, getStyle(); recordFoundTriple applies decreasing time bonus in BONUS and reshuffles deck; add Timer.modifyTime(long). Analytics gameType gains "_bonus" for BONUS.
Main UI & activity
app/src/main/java/com/antsapps/triples/MainActivity.java, app/src/main/res/layout/activity_main.xml, app/src/test/java/com/antsapps/triples/NavigationTest.java
Replace single Arcade new-game button with two-button container (fixed/bonus); startNewArcadeGame(...) now takes ArcadeStyle and click handlers/tests updated to assert analytics suffix for bonus.
ViewModel / resume state
app/src/main/java/com/antsapps/triples/MainViewModel.java
ArcadeResumeState gains style field and constructor argument; resume-state production captures game style (or null) and resume UI text now includes style.
Statistics UI & VM
app/src/main/java/com/antsapps/triples/stats/ArcadeStatisticsFragment.java, app/src/main/java/com/antsapps/triples/stats/ArcadeStatisticsViewModel.java, app/src/main/java/com/antsapps/triples/stats/StatisticsSelectorView.java, app/src/main/res/layout/stats_selector.xml
Add style selector chips and listener; ViewModel stores mStyle LiveData with set/get and triggers stats refresh; fragment registers as listener and selector view exposes show/set APIs.
Statistics backend & tests
app/src/main/java/com/antsapps/triples/backend/ArcadeStatistics.java, app/src/main/java/com/antsapps/triples/backend/Statistics.java, app/src/test/java/com/antsapps/triples/backend/ArcadeStatisticsTest.java
ArcadeStatistics constructor now accepts a style and filters input games by style; simplified predicate in Statistics; new unit test verifies style filtering.
Persistence & proto
app/src/main/java/com/antsapps/triples/backend/DBAdapter.java, app/src/main/java/com/antsapps/triples/backend/CloudSaveSerializer.java, app/src/main/proto/game_data.proto
DB schema version bumped and arcade_style column added with upgrade path; cloud serializer persists style; proto adds ArcadeStyleProto and style fields for summaries/states.
Application APIs
app/src/main/java/com/antsapps/triples/backend/Application.java
Added overload getArcadeStatistics(Period, boolean, ArcadeStyle); existing method delegates to new overload defaulting to FIXED.
Achievements / leaderboards
app/src/main/java/com/antsapps/triples/AchievementManager.java, app/src/main/java/com/antsapps/triples/ArcadeGameActivity.java, app/src/main/res/values/games-ids.xml
awardArcadeAchievements gains isBonus flag and awards separate thresholds; ArcadeGameActivity selects leaderboard/achievement IDs by game style; placeholder bonus IDs added.
Resources & layouts
app/src/main/res/layout/activity_main.xml, app/src/main/res/layout/stats_selector.xml, app/src/main/res/values/strings.xml
Activity layout adds two new-game buttons and hides the toggle group when appropriate; stats selector adds style label/chips; resume_game_arcade_format updated to include style string.
Tests & misc
app/src/test/java/com/antsapps/triples/ScreenshotTest.java, other minor files
Tests and helpers updated to construct ArcadeGame with style; minor API signature updates across callers (e.g., AchievementManager, MainActivity).

Sequence Diagram

sequenceDiagram
    actor Player
    participant MainActivity
    participant Application
    participant ArcadeGame
    participant Timer

    Player->>MainActivity: Tap "Bonus" button
    MainActivity->>Application: startNewArcadeGame(BONUS)
    Application->>ArcadeGame: createFromSeed(seed, BONUS)
    ArcadeGame->>ArcadeGame: init with BONUS style
    Player->>ArcadeGame: find triple
    ArcadeGame->>Timer: modifyTime(+bonusMs)
    Timer->>ArcadeGame: dispatchTimerTick (updated elapsed)
    ArcadeGame->>ArcadeGame: reshuffle deck after re-adding cards
    ArcadeGame->>Application: log analytics (game_type + "_bonus")
    ArcadeGame-->>Player: UI updates time and board
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 Hop-hop, two buttons side by side,

Fixed for steady, Bonus for extra stride.
Each triple gifts carrots — seconds in store,
Deck shuffles, scores tag "_bonus" evermore.
I twitch my whiskers — new games to adore!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.28% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Arcade Bonus Mode Implementation' accurately and concisely describes the primary change: adding a new Bonus style to Arcade mode with time bonus mechanics.
Linked Issues check ✅ Passed The PR fully implements issue #213 requirements: (1) Bonus style added with time bonus per triple [ArcadeGame.java] (2) Tiered bonus system with decreasing time bonuses implemented via recordFoundTriple [ArcadeGame.java] (3) Deck reshuffling when exhausted added in board update logic [ArcadeGame.java] (4) UI provides separate Fixed/Bonus buttons on main screen [MainActivity.java, activity_main.xml] (5) Statistics include style filter with FIXED as default [ArcadeStatisticsViewModel.java, StatisticsSelectorView.java] (6) Separate leaderboard and achievements for Bonus added [games-ids.xml, AchievementManager.java].
Out of Scope Changes check ✅ Passed All changes are directly related to implementing Arcade Bonus Mode: database schema updates for persistence [DBAdapter.java], ProtoBuf definitions for cloud save [game_data.proto], Timer modification for bonus time [Timer.java], statistics filtering [ArcadeStatistics.java], test additions [ArcadeStatisticsTest.java, NavigationTest.java], and UI/UX updates to support the new feature. No extraneous changes detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch arcade-bonus-mode-17888960947768524627

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/src/main/java/com/antsapps/triples/backend/Application.java`:
- Around line 233-239: The two-arg overload getArcadeStatistics(Period period,
boolean includeHinted) was changed to default to ArcadeStyle.FIXED and thus
drops Bonus runs; revert its behavior so it remains unfiltered by style: change
getArcadeStatistics(period, includeHinted) to call the original/3-arg
ArcadeStatistics constructor (or otherwise pass a sentinel that means “all
styles”) instead of forwarding ArcadeGame.ArcadeStyle.FIXED, and/or update
callers to pass an explicit style; adjust getArcadeStatistics(...) usages
accordingly so legacy callers continue to see all completed Arcade games (refer
to getArcadeStatistics overloads and the ArcadeStatistics constructor).

In `@app/src/main/java/com/antsapps/triples/backend/DBAdapter.java`:
- Around line 63-65: The Classic table creation string CREATE_CLASSIC_GAMES
incorrectly appends COLUMN_ARCADE_STYLE; remove the concatenation of
COLUMN_ARCADE_STYLE from the CREATE_CLASSIC_GAMES definition so the classic
schema does not include the ARCADE-only column, leaving COLUMN_ARCADE_STYLE
defined only in the arcade table creation (e.g., CREATE_ARCADE_GAMES); also
search for any code that assumes arcade_style exists on classic rows and update
migrations or versioning logic if needed to preserve compatibility.
- Around line 244-254: Reformat the transaction block in DBAdapter to satisfy
Spotless: ensure consistent indentation, spaces, and line breaks around the if
(oldVersion < 9) block and its try/catch/finally so it matches project style
(e.g., opening brace placement, one statement per line inside try, proper
indentation for addColumnIfMissing call and its parameters). Locate the block
containing addColumnIfMissing, TABLE_ARCADE_GAMES, and COLUMN_ARCADE_STYLE and
reflow it to the repository's Java formatting conventions so spotlessJavaCheck
passes.

In `@app/src/main/java/com/antsapps/triples/backend/Statistics.java`:
- Around line 13-20: The base Statistics constructor calls the overridable
shouldInclude(g) while subclasses (e.g., ArcadeStatistics) have not yet
initialized fields like mStyle; change Statistics(Iterable<? extends Game>
iterable, Period period, boolean includeHinted) to stop invoking shouldInclude
during construction: collect games without calling shouldInclude, assign
mGamesInPeriod to period.filter(collectedGames) only for the raw includeHinted
filter, and either (a) add a new constructor parameter or setter to accept an
explicit Predicate<Game>/filter from subclasses (so ArcadeStatistics can pass a
style-aware filter), or (b) provide a protected postInitFilter() method the
subclass calls after it sets mStyle which applies shouldInclude and updates
mGamesInPeriod; update ArcadeStatistics to call that post-init filtering after
mStyle is assigned and remove reliance on base ctor calling shouldInclude.

In `@app/src/main/java/com/antsapps/triples/MainActivity.java`:
- Around line 85-92: The Spotless Java formatting failures are due to the lambda
wrapping and line layout around mArcadeDropdownButton.setOnClickListener;
reformat the block to match project style (consistent indentation, line breaks,
and wrapping) by running the project's formatter (Spotless) or IDE formatter and
ensuring the lambda passed to showSplitMenu is formatted the same way as the
other occurrences (see showSplitMenu(...) usage and startNewArcadeGame(...)
invocation and the Iterables.getFirst(mApplication.getCurrentArcadeGames(),
null) expression); apply the same reformatting to the similar block at lines
239-251 so spotlessJavaCheck passes.
- Around line 171-174: Replace the hardcoded "Bonus"/"Fixed" passed to getString
in MainActivity (the resume label assembly where
getString(R.string.resume_game_arcade_format, state.triplesFound, ...)) with a
resource-backed string determined from the ArcadeGame.ArcadeStyle enum; add or
reuse existing string resources (e.g., R.string.arcade_style_bonus and
R.string.arcade_style_fixed or the existing button labels) and map state.style
to the appropriate getString(...) result so the formatted resume label uses
localized resources instead of hardcoded English.

In `@app/src/main/java/com/antsapps/triples/MainViewModel.java`:
- Around line 103-105: The constructor invocation for ArcadeResumeState passed
into mArcadeResumeState.setValue is misformatted and failing spotlessJavaCheck;
reformat the wrapped call to match the project's Spotless Java styling (run the
Spotless formatter or apply the project's formatting rules) so the two branches
use the same line-wrapping/indentation style for new ArcadeResumeState(true,
arcadeGame.getNumTriplesFound(), arcadeGame.getStyle()) and new
ArcadeResumeState(false, 0, null) and then re-run spotless checks.

In `@app/src/main/java/com/antsapps/triples/stats/ArcadeStatisticsFragment.java`:
- Around line 60-63: The fragment currently sets the arcade style in
onArcadeStyleChange(ArcadeGame.ArcadeStyle) but getLeaderboardId() still always
returns R.string.leaderboard_arcade_game; update getLeaderboardId() to switch on
mViewModel.getStyle() (or its live value) and return the correct leaderboard
resource for Fixed vs Bonus, and if the Bonus leaderboard ID/resource is not
available yet, make the leaderboard action hidden/disabled instead of returning
the Fixed ID; apply the same branching fix to the other location/method
mentioned (the code around the second use at lines 108-109) so both leaderboard
entry points respect the selected style.

In `@app/src/main/java/com/antsapps/triples/stats/ArcadeStatisticsViewModel.java`:
- Around line 27-31: Replace the seed for mStyle to use the most recently played
arcade run rather than only completed runs: change the Iterables.getLast(...)
call to pull from the collection of all/latest arcade games (e.g., use
application.getArcadeGames() or the API that returns runs including in‑progress
ones) instead of application.getCompletedArcadeGames(), then keep the same null
check and mStyle.setValue(lastPlayed.getStyle()) behavior so it falls back
safely if no runs exist; update the call site where Iterables.getLast and the
lastPlayed local are created in ArcadeStatisticsViewModel.

In `@app/src/main/java/com/antsapps/triples/stats/StatisticsSelectorView.java`:
- Around line 177-180: The label is hardcoded; instead derive it from the
selected chip or a string resource: when mStyleChipGroup is visible, get the
currently checked chip's text (use mStyleChipGroup.getCheckedChipId() then
findViewById<Chip>(id).getText()) and pass that text into addSummaryChip rather
than using the literal "Bonus"/"Fixed"; if the checked chip is null, fall back
to a localized string resource keyed to ArcadeGame.ArcadeStyle (use mStyle to
map to getString(...) fallback) to ensure localization and
single-source-of-truth for the label.

In `@app/src/main/res/layout/activity_main.xml`:
- Around line 135-136: Replace hardcoded android:text attributes in
activity_main.xml with string resources: add entries to res/values/strings.xml
(e.g., <string name="button_fixed">Fixed</string> and a name for the other
hardcoded label) and update the buttons in activity_main.xml to use
android:text="@string/button_fixed" and android:text="@string/your_other_name";
ensure you update both occurrences that currently use literal text so the UI is
localizable.

In `@app/src/main/res/layout/stats_selector.xml`:
- Around line 108-142: Replace hardcoded text in the stats_selector layout with
string resources: change the TextView with id style_label to use
android:text="@string/style_label", the Chip with id chip_style_fixed to use
android:text="@string/style_fixed", and the Chip with id chip_style_bonus to use
android:text="@string/style_bonus"; then add matching entries (style_label,
style_fixed, style_bonus) to strings.xml with the current values "STYLE",
"Fixed", and "Bonus" (and translated variants as needed).

In `@app/src/test/java/com/antsapps/triples/backend/ArcadeStatisticsTest.java`:
- Around line 41-46: Remove the temporary System.out.println calls around the
test instantiations of ArcadeStatistics (remove the two lines that call
System.out.println before asserting/getting getNumGames), leaving the assertions
and constructions for ArcadeStatistics(games, Period.ALL_TIME, true,
ArcadeGame.ArcadeStyle.FIXED) and ArcadeStatistics(games, Period.ALL_TIME, true,
ArcadeGame.ArcadeStyle.BONUS) intact; then run Spotless (spotlessJavaApply) to
reformat the long constructor lines and ensure the file passes
spotlessJavaCheck.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a0d361bc-c242-472b-990a-773f28c9021b

📥 Commits

Reviewing files that changed from the base of the PR and between ed77e1e and fa317ce.

📒 Files selected for processing (18)
  • app/src/main/java/com/antsapps/triples/MainActivity.java
  • app/src/main/java/com/antsapps/triples/MainViewModel.java
  • app/src/main/java/com/antsapps/triples/backend/Application.java
  • app/src/main/java/com/antsapps/triples/backend/ArcadeGame.java
  • app/src/main/java/com/antsapps/triples/backend/ArcadeStatistics.java
  • app/src/main/java/com/antsapps/triples/backend/CloudSaveSerializer.java
  • app/src/main/java/com/antsapps/triples/backend/DBAdapter.java
  • app/src/main/java/com/antsapps/triples/backend/Statistics.java
  • app/src/main/java/com/antsapps/triples/backend/Timer.java
  • app/src/main/java/com/antsapps/triples/stats/ArcadeStatisticsFragment.java
  • app/src/main/java/com/antsapps/triples/stats/ArcadeStatisticsViewModel.java
  • app/src/main/java/com/antsapps/triples/stats/StatisticsSelectorView.java
  • app/src/main/proto/game_data.proto
  • app/src/main/res/layout/activity_main.xml
  • app/src/main/res/layout/stats_selector.xml
  • app/src/main/res/values/strings.xml
  • app/src/test/java/com/antsapps/triples/NavigationTest.java
  • app/src/test/java/com/antsapps/triples/backend/ArcadeStatisticsTest.java

Comment thread app/src/main/java/com/antsapps/triples/backend/Application.java
Comment thread app/src/main/java/com/antsapps/triples/backend/DBAdapter.java Outdated
Comment thread app/src/main/java/com/antsapps/triples/backend/DBAdapter.java
Comment thread app/src/main/java/com/antsapps/triples/backend/Statistics.java Outdated
Comment thread app/src/main/java/com/antsapps/triples/MainActivity.java
Comment on lines +27 to +31
ArcadeGame lastPlayed =
com.google.common.collect.Iterables.getLast(application.getCompletedArcadeGames(), null);
if (lastPlayed != null) {
mStyle.setValue(lastPlayed.getStyle());
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Default this from the latest Arcade game, not only the latest completed one.

The requirement says the selector should default to the most recently played style. Seeding it from getCompletedArcadeGames() falls back to an older style whenever the user's newest Arcade run is still in progress.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/java/com/antsapps/triples/stats/ArcadeStatisticsViewModel.java`
around lines 27 - 31, Replace the seed for mStyle to use the most recently
played arcade run rather than only completed runs: change the
Iterables.getLast(...) call to pull from the collection of all/latest arcade
games (e.g., use application.getArcadeGames() or the API that returns runs
including in‑progress ones) instead of application.getCompletedArcadeGames(),
then keep the same null check and mStyle.setValue(lastPlayed.getStyle())
behavior so it falls back safely if no runs exist; update the call site where
Iterables.getLast and the lastPlayed local are created in
ArcadeStatisticsViewModel.

Comment on lines +177 to +180
// Style Chip
if (mStyleChipGroup.getVisibility() == View.VISIBLE) {
addSummaryChip(
mStyle == com.antsapps.triples.backend.ArcadeGame.ArcadeStyle.BONUS ? "Bonus" : "Fixed");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Don't hardcode the style summary label.

"Bonus" / "Fixed" here will drift from the actual chip copy and won't localize. Reuse the checked chip's text or a string resource instead.

Suggested change
     // Style Chip
     if (mStyleChipGroup.getVisibility() == View.VISIBLE) {
-      addSummaryChip(
-          mStyle == com.antsapps.triples.backend.ArcadeGame.ArcadeStyle.BONUS ? "Bonus" : "Fixed");
+      Chip selectedStyleChip =
+          mStyleChipGroup.findViewById(
+              mStyle == com.antsapps.triples.backend.ArcadeGame.ArcadeStyle.BONUS
+                  ? R.id.chip_style_bonus
+                  : R.id.chip_style_fixed);
+      addSummaryChip(String.valueOf(selectedStyleChip.getText()));
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/java/com/antsapps/triples/stats/StatisticsSelectorView.java`
around lines 177 - 180, The label is hardcoded; instead derive it from the
selected chip or a string resource: when mStyleChipGroup is visible, get the
currently checked chip's text (use mStyleChipGroup.getCheckedChipId() then
findViewById<Chip>(id).getText()) and pass that text into addSummaryChip rather
than using the literal "Bonus"/"Fixed"; if the checked chip is null, fall back
to a localized string resource keyed to ArcadeGame.ArcadeStyle (use mStyle to
map to getString(...) fallback) to ensure localization and
single-source-of-truth for the label.

Comment thread app/src/main/res/layout/activity_main.xml Outdated
Comment on lines +108 to +142
<TextView
android:id="@+id/style_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:text="STYLE"
android:textSize="10sp"
android:textStyle="bold"
android:textColor="@color/color_text_secondary"
android:visibility="gone" />

<com.google.android.material.chip.ChipGroup
android:id="@+id/style_chip_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="8dp"
android:visibility="gone"
app:selectionRequired="true"
app:singleSelection="true">

<com.google.android.material.chip.Chip
android:id="@+id/chip_style_fixed"
style="@style/Widget.MaterialComponents.Chip.Choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="Fixed" />

<com.google.android.material.chip.Chip
android:id="@+id/chip_style_bonus"
style="@style/Widget.MaterialComponents.Chip.Choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="Bonus" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Move the new style labels into string resources.

STYLE, Fixed, and Bonus are hardcoded here, so the new selector will not localize with the rest of the screen. Please switch these to @string/... entries.

🌐 Suggested cleanup
-            android:text="STYLE"
+            android:text="@string/stats_style_label"
...
-                android:text="Fixed" />
+                android:text="@string/arcade_style_fixed" />
...
-                android:text="Bonus" />
+                android:text="@string/arcade_style_bonus" />

Also add the corresponding entries in strings.xml.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<TextView
android:id="@+id/style_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:text="STYLE"
android:textSize="10sp"
android:textStyle="bold"
android:textColor="@color/color_text_secondary"
android:visibility="gone" />
<com.google.android.material.chip.ChipGroup
android:id="@+id/style_chip_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="8dp"
android:visibility="gone"
app:selectionRequired="true"
app:singleSelection="true">
<com.google.android.material.chip.Chip
android:id="@+id/chip_style_fixed"
style="@style/Widget.MaterialComponents.Chip.Choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="Fixed" />
<com.google.android.material.chip.Chip
android:id="@+id/chip_style_bonus"
style="@style/Widget.MaterialComponents.Chip.Choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="Bonus" />
<TextView
android:id="@+id/style_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:text="@string/stats_style_label"
android:textSize="10sp"
android:textStyle="bold"
android:textColor="@color/color_text_secondary"
android:visibility="gone" />
<com.google.android.material.chip.ChipGroup
android:id="@+id/style_chip_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="8dp"
android:visibility="gone"
app:selectionRequired="true"
app:singleSelection="true">
<com.google.android.material.chip.Chip
android:id="@+id/chip_style_fixed"
style="@style/Widget.MaterialComponents.Chip.Choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="@string/arcade_style_fixed" />
<com.google.android.material.chip.Chip
android:id="@+id/chip_style_bonus"
style="@style/Widget.MaterialComponents.Chip.Choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="@string/arcade_style_bonus" />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/res/layout/stats_selector.xml` around lines 108 - 142, Replace
hardcoded text in the stats_selector layout with string resources: change the
TextView with id style_label to use android:text="@string/style_label", the Chip
with id chip_style_fixed to use android:text="@string/style_fixed", and the Chip
with id chip_style_bonus to use android:text="@string/style_bonus"; then add
matching entries (style_label, style_fixed, style_bonus) to strings.xml with the
current values "STYLE", "Fixed", and "Bonus" (and translated variants as
needed).

Comment on lines +41 to +46
ArcadeStatistics fixedStats = new ArcadeStatistics(games, Period.ALL_TIME, true, ArcadeGame.ArcadeStyle.FIXED);
System.out.println("Fixed stats num games: " + fixedStats.getNumGames());
assertThat(fixedStats.getNumGames()).isEqualTo(2);

ArcadeStatistics bonusStats = new ArcadeStatistics(games, Period.ALL_TIME, true, ArcadeGame.ArcadeStyle.BONUS);
System.out.println("Bonus stats num games: " + bonusStats.getNumGames());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Drop the temporary stdout logging from this test.

The assertions already capture the behavior, so the System.out.println(...) calls just add noise to CI logs. Please run Spotless on this block while removing them—the long constructor lines here also match the current spotlessJavaCheck failure.

🧹 Suggested cleanup
-    ArcadeStatistics fixedStats = new ArcadeStatistics(games, Period.ALL_TIME, true, ArcadeGame.ArcadeStyle.FIXED);
-    System.out.println("Fixed stats num games: " + fixedStats.getNumGames());
+    ArcadeStatistics fixedStats =
+        new ArcadeStatistics(games, Period.ALL_TIME, true, ArcadeGame.ArcadeStyle.FIXED);
     assertThat(fixedStats.getNumGames()).isEqualTo(2);

-    ArcadeStatistics bonusStats = new ArcadeStatistics(games, Period.ALL_TIME, true, ArcadeGame.ArcadeStyle.BONUS);
-    System.out.println("Bonus stats num games: " + bonusStats.getNumGames());
+    ArcadeStatistics bonusStats =
+        new ArcadeStatistics(games, Period.ALL_TIME, true, ArcadeGame.ArcadeStyle.BONUS);
     assertThat(bonusStats.getNumGames()).isEqualTo(1);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/test/java/com/antsapps/triples/backend/ArcadeStatisticsTest.java`
around lines 41 - 46, Remove the temporary System.out.println calls around the
test instantiations of ArcadeStatistics (remove the two lines that call
System.out.println before asserting/getting getNumGames), leaving the assertions
and constructions for ArcadeStatistics(games, Period.ALL_TIME, true,
ArcadeGame.ArcadeStyle.FIXED) and ArcadeStatistics(games, Period.ALL_TIME, true,
ArcadeGame.ArcadeStyle.BONUS) intact; then run Spotless (spotlessJavaApply) to
reformat the long constructor lines and ensure the file passes
spotlessJavaCheck.

- Implemented 'Bonus' arcade style where triples grant extra time (5s for triples 1-5, 4s for 6-10, etc.).
- Updated Timer to allow time modifications.
- Modified ArcadeGame to handle bonus logic and deck reshuffling.
- Updated DBAdapter (v9) and ProtoBuf definitions for persistence and cloud sync.
- Redesigned MainActivity UI to offer Fixed and Bonus arcade options.
- Enhanced Statistics with style filtering and updated StatisticsSelectorView.
- Added ArcadeStatisticsTest to verify filtering logic.
- Applied code formatting via Spotless.

Co-authored-by: amorris13 <4523811+amorris13@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
app/src/main/java/com/antsapps/triples/backend/DBAdapter.java (1)

63-65: ⚠️ Potential issue | 🟠 Major

Remove arcade_style from Classic table creation.

CREATE_CLASSIC_GAMES still includes COLUMN_ARCADE_STYLE, which is arcade-only. This creates schema drift between fresh installs (column exists) and upgraded installs (column absent on classic table).

🛠️ Proposed fix
   private static final String CREATE_CLASSIC_GAMES =
       "CREATE TABLE "
           + TABLE_CLASSIC_GAMES
           + "("
@@
           + COLUMN_HINTS_USED
           + " INTEGER, " //
           + COLUMN_FOUND_TRIPLES
-          + " BLOB, " //
-          + COLUMN_ARCADE_STYLE
-          + " TEXT)";
+          + " BLOB)";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/java/com/antsapps/triples/backend/DBAdapter.java` around lines
63 - 65, The CREATE_CLASSIC_GAMES table definition currently appends
COLUMN_ARCADE_STYLE (arcade-only) causing schema drift; update the
CREATE_CLASSIC_GAMES SQL constant to remove any reference to COLUMN_ARCADE_STYLE
so the classic table creation string only includes classic columns (ensure
comma/parenthesis punctuation remains correct), and keep COLUMN_ARCADE_STYLE
only in the arcade table creation logic (e.g., CREATE_ARCADE_GAMES) if present.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@app/src/main/java/com/antsapps/triples/backend/DBAdapter.java`:
- Around line 63-65: The CREATE_CLASSIC_GAMES table definition currently appends
COLUMN_ARCADE_STYLE (arcade-only) causing schema drift; update the
CREATE_CLASSIC_GAMES SQL constant to remove any reference to COLUMN_ARCADE_STYLE
so the classic table creation string only includes classic columns (ensure
comma/parenthesis punctuation remains correct), and keep COLUMN_ARCADE_STYLE
only in the arcade table creation logic (e.g., CREATE_ARCADE_GAMES) if present.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b1012b9a-0575-4320-978e-a7cb80868f65

📥 Commits

Reviewing files that changed from the base of the PR and between fa317ce and a395dc2.

📒 Files selected for processing (6)
  • app/src/main/java/com/antsapps/triples/MainActivity.java
  • app/src/main/java/com/antsapps/triples/MainViewModel.java
  • app/src/main/java/com/antsapps/triples/backend/ArcadeStatistics.java
  • app/src/main/java/com/antsapps/triples/backend/DBAdapter.java
  • app/src/main/java/com/antsapps/triples/backend/Statistics.java
  • app/src/test/java/com/antsapps/triples/backend/ArcadeStatisticsTest.java
✅ Files skipped from review due to trivial changes (1)
  • app/src/main/java/com/antsapps/triples/backend/Statistics.java
🚧 Files skipped from review as they are similar to previous changes (4)
  • app/src/main/java/com/antsapps/triples/MainViewModel.java
  • app/src/main/java/com/antsapps/triples/backend/ArcadeStatistics.java
  • app/src/test/java/com/antsapps/triples/backend/ArcadeStatisticsTest.java
  • app/src/main/java/com/antsapps/triples/MainActivity.java

- Added 'Bonus' arcade style with decreasing time bonuses for triples found.
- Updated Timer to support time modifications.
- Enhanced ArcadeGame with bonus logic and deck reshuffling.
- Updated DBAdapter (v9) and ProtoBuf for persistence.
- Redesigned MainActivity to offer 'Fixed' and 'Bonus' arcade options.
- Added style filtering to Statistics and updated StatisticsSelectorView.
- Fixed NullPointerExceptions in BaseStatisticsFragment and ScreenshotTest.
- Added ArcadeStatisticsTest and updated NavigationTest.
- Fixed compilation errors in Statistics and AchievementManager.
- Applied code formatting via Spotless.

Co-authored-by: amorris13 <4523811+amorris13@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
app/src/test/java/com/antsapps/triples/ScreenshotTest.java (1)

425-459: Consider parameterizing setupArcadeGame by ArcadeStyle for screenshot coverage.

Right now the completed fixture hardcodes FIXED (Line 451), so BONUS-specific arcade UI regressions may be missed. A setupArcadeGame(boolean completed, ArcadeGame.ArcadeStyle style) helper plus BONUS snapshots would improve coverage.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/test/java/com/antsapps/triples/ScreenshotTest.java` around lines 425
- 459, The helper setupArcadeGame(boolean completed) currently hardcodes
ArcadeGame.ArcadeStyle.FIXED for the completed fixture; change its signature to
setupArcadeGame(boolean completed, ArcadeGame.ArcadeStyle style) and use the
provided style when constructing the ArcadeGame (replace the FIXED usage in the
ArcadeGame constructor call), update all existing callers to pass the desired
style (keep existing tests passing by passing FIXED where appropriate), and add
new test invocations that call setupArcadeGame(...,
ArcadeGame.ArcadeStyle.BONUS) to capture BONUS screenshots for UI regression
coverage.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/src/main/java/com/antsapps/triples/AchievementManager.java`:
- Around line 124-143: Summary: awardArcadeCountAchievements is only called for
non-BONUS games, so Bonus-only players lose count achievements; include bonus
games in the count. Fix: in AchievementManager adjust the logic after the loop
(which sets completedArcadeGames and completedArcadeBonusGames) to ensure
awardArcadeCountAchievements is invoked for bonus games as well—either call
awardArcadeCountAchievements(context, completedArcadeGames +
completedArcadeBonusGames) once, or call awardArcadeCountAchievements(context,
completedArcadeGames) and also awardArcadeCountAchievements(context,
completedArcadeBonusGames) when completedArcadeBonusGames > 0; reference
completedArcadeGames, completedArcadeBonusGames, and
awardArcadeCountAchievements to locate the change.

In `@app/src/main/res/values/games-ids.xml`:
- Around line 90-96: The strings in games-ids.xml
(achievement_arcade_bonus_5_triples, achievement_arcade_bonus_10_triples,
achievement_arcade_bonus_25_triples, achievement_arcade_bonus_50_triples,
achievement_arcade_bonus_75_triples, achievement_arcade_bonus_100_triples,
leaderboard_arcade_bonus_game) are current placeholders and must be replaced
with the real Play Games service IDs; update each string value to the actual
achievement and leaderboard IDs from the Play Console so AchievementManager.java
(unlock calls) and ArcadeGameActivity.java (score submission calls) reference
valid IDs and achievements/leaderboard submissions will work.

---

Nitpick comments:
In `@app/src/test/java/com/antsapps/triples/ScreenshotTest.java`:
- Around line 425-459: The helper setupArcadeGame(boolean completed) currently
hardcodes ArcadeGame.ArcadeStyle.FIXED for the completed fixture; change its
signature to setupArcadeGame(boolean completed, ArcadeGame.ArcadeStyle style)
and use the provided style when constructing the ArcadeGame (replace the FIXED
usage in the ArcadeGame constructor call), update all existing callers to pass
the desired style (keep existing tests passing by passing FIXED where
appropriate), and add new test invocations that call setupArcadeGame(...,
ArcadeGame.ArcadeStyle.BONUS) to capture BONUS screenshots for UI regression
coverage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1482b5b3-79f6-4419-907f-3d99168d3a11

📥 Commits

Reviewing files that changed from the base of the PR and between a395dc2 and b6a9cc0.

📒 Files selected for processing (6)
  • app/src/main/java/com/antsapps/triples/AchievementManager.java
  • app/src/main/java/com/antsapps/triples/ArcadeGameActivity.java
  • app/src/main/java/com/antsapps/triples/stats/BaseStatisticsFragment.java
  • app/src/main/res/values/games-ids.xml
  • app/src/main/res/values/strings.xml
  • app/src/test/java/com/antsapps/triples/ScreenshotTest.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/main/res/values/strings.xml

Comment on lines +124 to +143
int completedArcadeBonusGames = 0;
int maxArcadeBonusTriples = 0;
for (ArcadeGame game : application.getCompletedArcadeGames()) {
if (!game.areHintsUsed()) {
completedArcadeGames++;
maxArcadeTriples = Math.max(maxArcadeTriples, game.getNumTriplesFound());
if (game.getStyle() == ArcadeGame.ArcadeStyle.BONUS) {
completedArcadeBonusGames++;
maxArcadeBonusTriples = Math.max(maxArcadeBonusTriples, game.getNumTriplesFound());
} else {
completedArcadeGames++;
maxArcadeTriples = Math.max(maxArcadeTriples, game.getNumTriplesFound());
}
}
}
if (completedArcadeGames > 0) {
awardArcadeAchievements(context, maxArcadeTriples);
awardArcadeAchievements(context, maxArcadeTriples, false);
awardArcadeCountAchievements(context, completedArcadeGames);
}
if (completedArcadeBonusGames > 0) {
awardArcadeAchievements(context, maxArcadeBonusTriples, true);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Arcade count achievements now exclude Bonus games during sync.

At Line 128 to Line 134, bonus games are no longer included in completedArcadeGames, but Line 139 still uses that value for awardArcadeCountAchievements(...). This regresses count achievements for users who play only Bonus style (or mostly Bonus).

Suggested fix
-    int completedArcadeGames = 0;
+    int completedArcadeGames = 0;
+    int completedArcadeGamesTotal = 0;
     int maxArcadeTriples = 0;
     int completedArcadeBonusGames = 0;
     int maxArcadeBonusTriples = 0;
     for (ArcadeGame game : application.getCompletedArcadeGames()) {
       if (!game.areHintsUsed()) {
+        completedArcadeGamesTotal++;
         if (game.getStyle() == ArcadeGame.ArcadeStyle.BONUS) {
           completedArcadeBonusGames++;
           maxArcadeBonusTriples = Math.max(maxArcadeBonusTriples, game.getNumTriplesFound());
         } else {
           completedArcadeGames++;
           maxArcadeTriples = Math.max(maxArcadeTriples, game.getNumTriplesFound());
         }
       }
     }
     if (completedArcadeGames > 0) {
       awardArcadeAchievements(context, maxArcadeTriples, false);
-      awardArcadeCountAchievements(context, completedArcadeGames);
     }
+    if (completedArcadeGamesTotal > 0) {
+      awardArcadeCountAchievements(context, completedArcadeGamesTotal);
+    }
     if (completedArcadeBonusGames > 0) {
       awardArcadeAchievements(context, maxArcadeBonusTriples, true);
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/java/com/antsapps/triples/AchievementManager.java` around lines
124 - 143, Summary: awardArcadeCountAchievements is only called for non-BONUS
games, so Bonus-only players lose count achievements; include bonus games in the
count. Fix: in AchievementManager adjust the logic after the loop (which sets
completedArcadeGames and completedArcadeBonusGames) to ensure
awardArcadeCountAchievements is invoked for bonus games as well—either call
awardArcadeCountAchievements(context, completedArcadeGames +
completedArcadeBonusGames) once, or call awardArcadeCountAchievements(context,
completedArcadeGames) and also awardArcadeCountAchievements(context,
completedArcadeBonusGames) when completedArcadeBonusGames > 0; reference
completedArcadeGames, completedArcadeBonusGames, and
awardArcadeCountAchievements to locate the change.

Comment on lines +90 to +96
<string name="achievement_arcade_bonus_5_triples" translatable="false">placeholder_bonus_5</string>
<string name="achievement_arcade_bonus_10_triples" translatable="false">placeholder_bonus_10</string>
<string name="achievement_arcade_bonus_25_triples" translatable="false">placeholder_bonus_25</string>
<string name="achievement_arcade_bonus_50_triples" translatable="false">placeholder_bonus_50</string>
<string name="achievement_arcade_bonus_75_triples" translatable="false">placeholder_bonus_75</string>
<string name="achievement_arcade_bonus_100_triples" translatable="false">placeholder_bonus_100</string>
<string name="leaderboard_arcade_bonus_game" translatable="false">placeholder_bonus_leaderboard</string>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify unresolved placeholder IDs and where they are used.

rg -n 'placeholder_bonus_|placeholder_' app/src/main/res/values/games-ids.xml
rg -n 'achievement_arcade_bonus_|leaderboard_arcade_bonus_game' \
  app/src/main/java/com/antsapps/triples/AchievementManager.java \
  app/src/main/java/com/antsapps/triples/ArcadeGameActivity.java

Repository: amorris13/triples

Length of output: 1856


Replace placeholder Play Games IDs with actual service identifiers.

Lines 90-96 contain placeholder values that will prevent achievement unlocks and leaderboard submission. These resource IDs are actively used in AchievementManager.java and ArcadeGameActivity.java to unlock achievements and submit scores.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/res/values/games-ids.xml` around lines 90 - 96, The strings in
games-ids.xml (achievement_arcade_bonus_5_triples,
achievement_arcade_bonus_10_triples, achievement_arcade_bonus_25_triples,
achievement_arcade_bonus_50_triples, achievement_arcade_bonus_75_triples,
achievement_arcade_bonus_100_triples, leaderboard_arcade_bonus_game) are current
placeholders and must be replaced with the real Play Games service IDs; update
each string value to the actual achievement and leaderboard IDs from the Play
Console so AchievementManager.java (unlock calls) and ArcadeGameActivity.java
(score submission calls) reference valid IDs and achievements/leaderboard
submissions will work.

google-labs-jules Bot and others added 2 commits March 28, 2026 13:03
- Added 'Bonus' arcade style where triples grant extra time (5s for triples 1-5, 4s for 6-10, etc.).
- Updated Timer and ArcadeGame to support time modifications and bonus logic.
- Redesigned MainActivity UI with 'Fixed' and 'Bonus' arcade buttons.
- Enhanced Statistics with style filtering and updated StatisticsSelectorView.
- Fixed an initialization order bug in BaseStatisticsFragment that caused NPEs in tests.
- Corrected a database schema error where 'arcade_style' was accidentally added to Classic games.
- Updated ScreenshotTest to properly support the new Arcade style.
- Ensured all tests pass and screenshots are bit-identical via verifyRoborazziDebug.
- Applied code formatting via Spotless.

Co-authored-by: amorris13 <4523811+amorris13@users.noreply.github.com>
- Redesigned Arcade section in MainActivity to always show 'Fixed' and 'Bonus' new game buttons.
- Allowed Resume split-button group to appear above new game buttons when a game is in progress.
- Added string resources for 'Fixed' and 'Bonus' styles.
- Updated ArcadeGameActivity to use current game style for performance stats and 'Play Again'.
- Synchronized Statistics UI to use proper style labels.
- Verified bit-identical Roborazzi screenshots.

Co-authored-by: amorris13 <4523811+amorris13@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
app/src/main/java/com/antsapps/triples/ArcadeGameActivity.java (1)

100-103: Consider differentiating game type for analytics.

The method returns "Arcade" for both Fixed and Bonus styles. If analytics require distinguishing between the two styles, consider returning a style-specific string (e.g., "Arcade Fixed" or "Arcade Bonus"). If both styles should be grouped under a single "Arcade" category for analytics, the current implementation is fine.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/java/com/antsapps/triples/ArcadeGameActivity.java` around lines
100 - 103, getGameType() in ArcadeGameActivity currently returns the generic
"Arcade" which prevents analytics from distinguishing Fixed vs Bonus; update
getGameType() to return a style-specific string (e.g., "Arcade Fixed" or "Arcade
Bonus") by checking the existing style indicator used by this activity (use the
activity's field or method that represents the mode — e.g., a gameStyle field,
getStyle(), or isBonusStyle()) and return "Arcade Fixed" when style indicates
fixed play and "Arcade Bonus" when it indicates bonus play; if no style accessor
exists, add a minimal accessor to determine the mode and use it in
getGameType().
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/src/main/java/com/antsapps/triples/ArcadeGameActivity.java`:
- Around line 100-103: getGameType() in ArcadeGameActivity currently returns the
generic "Arcade" which prevents analytics from distinguishing Fixed vs Bonus;
update getGameType() to return a style-specific string (e.g., "Arcade Fixed" or
"Arcade Bonus") by checking the existing style indicator used by this activity
(use the activity's field or method that represents the mode — e.g., a gameStyle
field, getStyle(), or isBonusStyle()) and return "Arcade Fixed" when style
indicates fixed play and "Arcade Bonus" when it indicates bonus play; if no
style accessor exists, add a minimal accessor to determine the mode and use it
in getGameType().

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d24bb9c8-7a4e-43d5-92c3-49bac6b3d59d

📥 Commits

Reviewing files that changed from the base of the PR and between a164d4c and 1398324.

📒 Files selected for processing (5)
  • app/src/main/java/com/antsapps/triples/ArcadeGameActivity.java
  • app/src/main/java/com/antsapps/triples/MainActivity.java
  • app/src/main/java/com/antsapps/triples/stats/StatisticsSelectorView.java
  • app/src/main/res/layout/activity_main.xml
  • app/src/main/res/values/strings.xml
🚧 Files skipped from review as they are similar to previous changes (3)
  • app/src/main/res/layout/activity_main.xml
  • app/src/main/java/com/antsapps/triples/stats/StatisticsSelectorView.java
  • app/src/main/java/com/antsapps/triples/MainActivity.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a new Arcade Style where every triple found gives you a time bonus.

1 participant