Skip to content

Tests: haptics, the idle screen, the hit shake and the bonus flash - #42

Merged
jpcottin merged 1 commit into
mainfrom
test/haptics-idle-and-effects
Oct 23, 2026
Merged

jpcottin merged 1 commit into
mainfrom
test/haptics-idle-and-effects

Conversation

@jpcottin

Copy link
Copy Markdown
Owner

Fourteen Google Test cases on behaviour the suite had not pinned down.

  • Haptics: a bomb hit fires the haptic callback once, the last life and the invasion still do, a shielded hit and a power-up pickup do not.
  • Idle screen: only the title, game over and win screens are idle (a round and the level-clear animation are not); the phone idles while the glasses play the round, the glasses instance itself does not.
  • Effects: a hit shakes the screen at full strength and the shake settles within a second; a shielded hit shakes at half strength; a new level starts still; a caught power-up flashes its level-scaled value just above where it was caught and fades; a new game clears the flash.
  • Tally: a new game resets level, lives, score, the shot counters, the power-ups, the high-score flag and the battlefield.

game.h gains debug-only accessors for the lives, the shake amount and the bonus flash. README test count 128 -> 142.

Verified: scripts/host-tests.sh 142/142; the Debug native build (NDK clang, game_tests for both ABIs) compiles.

Fourteen Google Test cases on behaviour the suite had not pinned down:

- Haptics: a bomb hit fires the haptic callback once, the last life
  and the invasion still do, a shielded hit and a power-up pickup do
  not.
- Idle screen: only the title, game over and win screens are idle (a
  round and the level-clear animation are not); the phone idles while
  the glasses play the round, the glasses instance itself does not.
- Effects: a hit shakes the screen at full strength and the shake
  settles within a second; a shielded hit shakes at half strength; a
  new level starts still; a caught power-up flashes its level-scaled
  value just above where it was caught and fades; a new game clears
  the flash.
- Tally: a new game resets level, lives, score, the shot counters, the
  power-ups, the high-score flag and the battlefield.

game.h gains debug-only accessors for the lives, the shake amount and
the bonus flash. README test count 128 -> 142.
@jpcottin
jpcottin merged commit 88bf903 into main Oct 23, 2026
20 checks passed
@jpcottin
jpcottin deleted the test/haptics-idle-and-effects branch October 23, 2026 02:42
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.

1 participant