Skip to content

refactor(examples): standardize arcade examples on GameApp module layout #226

Description

@salazarsebas

Background

Several arcade examples use monolithic lib.rs files or pre-1.0 ECS wiring patterns. snake is referenced as the GameApp demonstration, but its documentation predates EXAMPLE_STANDARD.md and omits required sections including public API documentation, storage model description, and known limitations.

Objective

Align a defined set of arcade examples with the module structure and documentation requirements of EXAMPLE_STANDARD.md, establishing snake as the maintained reference implementation.

In scope

Examples: snake, flappy_bird, tetris, space_invaders, geometry_dash, pong

Per example:

  1. Ensure cougr-core = "1.1.0" (if not addressed by the version bump issue).
  2. Adopt module layout: lib.rs (contract entrypoints and GameApp wiring), components.rs, systems.rs.
  3. Rewrite README.md per EXAMPLE_STANDARD.md §4.
  4. Add tests for invalid actions and GameApp tick integration.
  5. Classify snake as Canonical; classify remaining examples as Transitional with a banner referencing snake, unless fully migrated.

Out of scope

  • Gameplay rule changes or feature additions.
  • Examples outside the listed set.

Definition of done

  • All six examples pass cargo test and stellar contract build.
  • snake/README.md satisfies all sections in EXAMPLE_STANDARD.md §4.
  • Transitional examples include the classification banner defined in EXAMPLE_STANDARD.md §7.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or requestexampleNew game example contractgameGame implementation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions