Skip to content

[FEATURE]Refactor the frontend/public/games/Tower of Hanoi state orchestration and rendering pipelines #403

Description

@Facelessism

💡 Summary

Improve the frontend/public/games/Tower of Hanoi by introducing scalable state management, dynamic disk generation, optimized rendering, accessibility support, centralized configuration constants and stronger win state validation to improve scalability, rendering efficiency, accessibility and maintainability.


🔍 Problem Statement

The current implementation is tightly coupled to a fixed 3disk setup and relies on full DOM rerendering after every move. Also, the game lacks accessibility and interaction support, containing multiple hardcoded values (magic numbers) and performs weak win condition validation that only checks disk count instead of actual order integrity.


🧩 Proposed Solution

  • Replace hardcoded values with configurable constants.
  • Separate game state from rendering logic
  • Avoid the rebuilding of full DOM after every move.
  • Improve the win validation by checking solved disk order.

✅ Checklist

  • I have checked existing issues for similar feature requests.
  • I have clearly explained the benefit of this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions