Games App: Pong, Snake and Tetris
CI / build (pull_request) Successful in 2m20s
Site / build (pull_request) Successful in 10s

A new App (issue #101) that shows its three Games as icons, as the
Launcher shows Apps, and plays the one chosen. A Game left in the middle
is found again paused; one being played keeps the screen lit. Tetris
plays Korobeiniki on a speaker channel of its own, faster with each
level: 0 switches it, 8 and 9 set its volume, both remembered. The drop
is on 1, away from the arrows. The best of each Game is kept.

Played on the device. The speeds are as tuned there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0162FokPdvY2KsS4NBfwyWPk
This commit is contained in:
2026-10-13 22:59:05 +02:00
co-authored by Claude Opus 5.5
parent 68d50b320f
commit ec15c2f52a
15 changed files with 835 additions and 0 deletions
+4
View File
@@ -50,6 +50,10 @@ class App {
virtual bool retainsContent() const { return false; }
virtual void contentLost() {}
// True while the App is in use with no key being pressed (a Game being played, issue #101):
// it counts as activity, so the screen neither dims nor goes off.
virtual bool keepsScreenOn() const { return false; }
// True while something goes on in the App that is worth a look, whether it is in front or
// not (unread messages, a recording running): the Launcher marks its tile (issue #9).
virtual bool badge() const { return false; }
+36
View File
@@ -329,6 +329,42 @@ inline constexpr KeyHelp kVpn[] = {
{"; .", "up, down"},
};
// games: Games, the three games
inline constexpr KeyHelp kGames[] = {
{"Enter", "this game"},
{", /", "the game before, the next"},
};
// games-pong: Games, Pong
inline constexpr KeyHelp kGamesPong[] = {
{"; .", "the paddle, while held"},
{"Enter", "start, or start again"},
{"p", "pause; any key carries on"},
{"`", "the other games; this one waits"},
};
// games-snake: Games, Snake
inline constexpr KeyHelp kGamesSnake[] = {
{"; . , /", "turn"},
{"Enter", "start, or start again"},
{"p", "pause; any key carries on"},
{"`", "the other games; this one waits"},
};
// games-tetris: Games, Tetris
inline constexpr KeyHelp kGamesTetris[] = {
{", /", "left, right; held, it repeats"},
{";", "turn"},
{"z", "turn the other way"},
{".", "fall faster, while held"},
{"1", "drop"},
{"0", "the music, on or off"},
{"8 9", "the music, quieter, louder"},
{"Enter", "start, or start again"},
{"p", "pause; any key carries on"},
{"`", "the other games; this one waits"},
};
// ssh: SSH, the hosts
inline constexpr KeyHelp kSsh[] = {
{"Enter", "connect, open"},