Skip to content

feat: implement Reversi with board flipping and positional scoring#88

Merged
salazarsebas merged 8 commits intosalazarsebas:mainfrom
miguelnietoa:feat/reversi-example
Mar 26, 2026
Merged

feat: implement Reversi with board flipping and positional scoring#88
salazarsebas merged 8 commits intosalazarsebas:mainfrom
miguelnietoa:feat/reversi-example

Conversation

@miguelnietoa
Copy link
Contributor

Closes #76

Summary

  • Implements a complete Reversi (Othello) game as a Soroban smart contract using Cougr's ECS pattern
  • Components: BoardComponent, TurnComponent, GameStatusComponent, ScoreComponent stored as a single ECSWorldState
  • Systems pipeline in submit_move: validation → flip resolution → scoring → turn/pass → end condition
  • 14 unit tests covering init, move validation, horizontal/vertical/diagonal flips, score tracking, turn management, and re-init guard
  • README with ECS design, contract API, rules, implementation patterns, and Testnet deployment instructions
  • MATCH_LOG documenting a real Testnet game (Black wins 36–28 in 60 moves)

Test plan

  • cargo test — 14/14 passing
  • cargo clippy --all-targets --all-features -- -D warnings — clean
  • cargo fmt --check — clean
  • Deployed and played to completion on Testnet (CAQCSRHZZ4O3LN3LEQVF3JQ3H7UI7XPR65WWSCWKUWDKITSEFVRHF2OW)

@drips-wave
Copy link

drips-wave bot commented Mar 26, 2026

@miguelnietoa Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Copy link
Owner

@salazarsebas salazarsebas left a comment

Choose a reason for hiding this comment

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

LGTM

@salazarsebas
Copy link
Owner

Hey @miguelnietoa , please just fix the format error

@miguelnietoa
Copy link
Contributor Author

Done, thanks @salazarsebas!

@salazarsebas salazarsebas merged commit ea0cc95 into salazarsebas:main Mar 26, 2026
1 check passed
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.

feat: implement Reversi with board flipping and positional scoring

2 participants