About
## Wave 1 submission
In this wave, we built the complete game client and began smart contract integration for The Phoenix Throne, an FHE-powered hidden-information strategy game on Fhenix CoFHE.
Game Client (Complete)
We built a fully playable React and TypeScript frontend with a solo mode against an AI opponent across three difficulty tiers: Easy (5x5), Medium (7x7), and Hard (9x9). The core game loop supports four player actions: Strike, attack a cell to find hidden units; Scan, detect presence in a 2x2 area without revealing unit type; Relocate, move a surviving unit to a new hidden position; and an 8-minute per-turn timer with auto-forfeit.
The AI uses difficulty-scaled strategies, tracking hit and miss history, prioritizing adjacent cells after decoy hits, and leveraging scan data to narrow targets.
State management uses custom React hooks. useGame handles all game logic, including strike resolution, AI turn processing, bonus strikes from decoy hits, and relocations. useContract manages wallet connection, contract instantiation, and chain calls. The architecture is local-first. Game logic resolves instantly in the browser and chain transactions run in the background without blocking the UI.
The UI features drag-and-drop unit placement, dual game boards with fog of war, action popovers, an AI thinking overlay, a turn-grouped game log with inline Etherscan transaction badges, and Phoenix-themed game-over screens. Wallet connection uses MetaMask via ethers.js v6.
Smart Contract (Deployed, Integration in Progress) We wrote PhoenixThrone.sol, which stores encrypted board positions using Fhenix FHE types (euint8). It supports createGame with 10 encrypted positions, executeTurn using FHE.eq for strike verification and FHE.select for elimination, relocate for encrypted position updates, and forfeit. Each function emits events for audit trails. The contract compiles successfully and is deployed to Ethereum Sepolia at 0x09Aa8623807CfEC82c05242DFa53F8ec5428fEf2. The frontend is fully wired. cofhejs v0.3.1 handles client-side encryption, the ABI is integrated, and all service functions are implemented with graceful fallback. When the CoFHE coprocessor is unavailable, the game operates seamlessly in local-only mode.
What is still in progress
The CoFHE coprocessor on Sepolia is not reliably available for v0.3.1, which causes cofhejs.encrypt() to fail. The contract and frontend code are ready. Completion depends on stable coprocessor infrastructure or upgrading the SDK to v0.4.0.
From the public Akindo product page. Votes, swipes and the judge score are hackfeed's own.





