feat: add cards templete

This commit is contained in:
2026-06-24 10:47:54 +03:30
parent 60494946d6
commit b1c7bfdd06
124 changed files with 422 additions and 30 deletions
+5
View File
@@ -6,11 +6,14 @@ type Settler interface {
ChargeEntry(userID int64, tier string) error // کسر ورودی هنگام ورود به صف
Refund(userID int64, tier string) // بازگرداندن ورودی در صورت لغو
AwardWinner(userID int64, tier string) // جایزه/XP/جام به برنده
AwardRank(userID int64, tier string, won bool) // امتیازِ رتبه (میزِ رتبه‌بندی)
RecordGame(room, playersJSON string, winnerTeam int, kot bool)
// آمار پروفایل (همگی غیرحیاتی و fire-and-forget).
RecordHand(userID int64, won, kot, asHakem bool) // پایان یک هَند
RecordCut(userID int64) // بُرِش با حکم
RecordGameResult(userID int64, won bool) // پایان بازی (برد/باخت)
// PlayerProfile سکه و نشانِ رتبه‌ی بازیکن را برای نمایش سرِ میز برمی‌گرداند.
PlayerProfile(userID int64) (coins int64, rankTier string)
// میز خصوصی (دورهمی).
ChargePrivateTable(userID int64) error // مصرفِ یک میز رایگان (خطا اگر سقف پر باشد)
PrivateTableInfo(userID int64) (remaining int, unlimited bool)
@@ -24,10 +27,12 @@ type noopSettler struct{}
func (noopSettler) ChargeEntry(int64, string) error { return nil }
func (noopSettler) Refund(int64, string) {}
func (noopSettler) AwardWinner(int64, string) {}
func (noopSettler) AwardRank(int64, string, bool) {}
func (noopSettler) RecordGame(string, string, int, bool) {}
func (noopSettler) RecordHand(int64, bool, bool, bool) {}
func (noopSettler) RecordCut(int64) {}
func (noopSettler) RecordGameResult(int64, bool) {}
func (noopSettler) PlayerProfile(int64) (int64, string) { return 0, "" }
func (noopSettler) ChargePrivateTable(int64) error { return nil }
func (noopSettler) PrivateTableInfo(int64) (int, bool) { return 0, true }
func (noopSettler) TargetHands(string) int { return 7 }