Build Hokm card game: offline vs-AI + online social/gamification (mock backend)

- Pure-TS Hokm engine (deal, hakem, trump, tricks, scoring, Kot) + AI bots
- Persian-luxury RTL UI (Next 16 / React 19 / Tailwind v4 / Framer Motion / Zustand)
- Online platform behind OnlineService seam (mock now, .NET SignalR later):
  auth (phone OTP + email/Google), profiles, friends, private rooms with
  partner pick, ranked matchmaking, leaderboard, shop
- Gamification: ranks/leagues, coins, XP/levels, daily rewards, achievements
- i18n fa/en, PWA manifest, engine + gamification sims

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-04 10:11:00 +03:30
parent dff1a34f95
commit e2d0a602b6
41 changed files with 5766 additions and 93 deletions
+36
View File
@@ -0,0 +1,36 @@
"use client";
import { create } from "zustand";
export type Screen =
| "home"
| "auth"
| "profile"
| "friends"
| "online" // online lobby (create room / play random)
| "room"
| "matchmaking"
| "leaderboard"
| "shop"
| "game"; // the table (used for both ai + online)
interface UIStore {
screen: Screen;
/** screen to return to from the game table */
returnTo: Screen;
dailyModalOpen: boolean;
go: (screen: Screen) => void;
goGame: (returnTo?: Screen) => void;
openDaily: () => void;
closeDaily: () => void;
}
export const useUIStore = create<UIStore>((set) => ({
screen: "home",
returnTo: "home",
dailyModalOpen: false,
go: (screen) => set({ screen }),
goGame: (returnTo = "home") => set({ screen: "game", returnTo }),
openDaily: () => set({ dailyModalOpen: true }),
closeDaily: () => set({ dailyModalOpen: false }),
}));