Skip to content

Add Godot commit-reveal turn phases#62

Merged
leocagli merged 13 commits into
Bitcoindefi:mainfrom
Vinaystwt:vinay/godot-turn-phases-35
Jun 30, 2026
Merged

Add Godot commit-reveal turn phases#62
leocagli merged 13 commits into
Bitcoindefi:mainfrom
Vinaystwt:vinay/godot-turn-phases-35

Conversation

@Vinaystwt

Copy link
Copy Markdown
Contributor

Summary

  • Extend TurnManager with commit/reveal turn phases
  • Add commit, reveal, resolve, and finalised phase helpers
  • Route commit/reveal payloads through WebBridge
  • Emit phase transitions through EventBus
  • Store minimal phase and payload metadata in GameState

What changed

  • Added phase constants:

    • COMMIT
    • REVEAL
    • RESOLVE
    • FINALIZED
  • Added methods:

    • begin_commit
    • submit_commit
    • begin_reveal
    • submit_reveal
    • resolve_turn
    • finalise_turn
  • Added defensive WebBridge checks before calling browser/Soroban bridge methods

  • Added EventBus web3_error reporting for unavailable bridge paths

  • Documented expected commit, reveal, and finalisation payload shapes

Behavior

  • Commit/reveal flow stays inside TurnManager
  • Blockchain-facing actions are still abstracted behind WebBridge
  • Scenes/managers can observe turn state via EventBus
  • GameState.metadata records current phase and last commit/reveal/resolution/finalisation payloads
  • Generic setup/start/main/end turn flow remains intact

Verification

  • git diff --check passed
  • Generated artifact scan was clean
  • No dist/, .godot/, .import, or .uid artifacts included

Note: Godot/GDScript runtime syntax checks were not run locally because godot/godot4 is not installed in PATH.

@leocagli

Copy link
Copy Markdown
Collaborator

Hi @Vinaystwt 👋 — heads-up that #55 (EventBus autoload) merged to main and touches the same project.godot / export_presets.cfg config this PR changes, so it now conflicts. A quick rebase on latest main (resolving the autoload/export entries) should clear it and I'll merge it right after. Thanks! 🙏

# Conflicts:
#	godot/autoloads/TurnManager.gd
@leocagli leocagli merged commit 5233026 into Bitcoindefi:main Jun 30, 2026
1 check passed
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants