feat(examples): Pac-Man on-chain game using Cougr-Core #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements a complete Pac-Man on-chain game example in the
examples/pac_manfolder, demonstrating how developers can use thecougr-corepackage to implement game logic on the Stellar blockchain via Soroban.Changes
examples/pac_manwith proper Soroban contract setupTestnet Deployment
Contract successfully deployed and tested on Stellar Testnet:
CAFNZL3TLTWROTHAOO6GSOT2AKQVB4HCSANAMZI3SPJST5CEF6K4TRTOVerified Invocations
init_game- Game initialized with score 0, lives 3, 47 pelletschange_direction- Direction changed successfullyupdate_tick- Game state updated, pellet collected, score increased to 10get_score- Read-only query returned correct valueTest Plan
cargo buildcompiles without errorsstellar contract buildgenerates WASM (15KB, well under 64KB limit)cargo test- All 30 tests passcargo fmt --check- No formatting issuescargo clippy- No warningsAcceptance Criteria (from Issue #10)
cargo build,stellar contract build,cargo test) run without errorscougr-corein key componentsCloses #10