feat: add coin for private table

This commit is contained in:
2026-07-04 12:45:07 +03:30
parent 413fca68cc
commit 63716576ca
6 changed files with 104 additions and 8 deletions
+6
View File
@@ -16,6 +16,10 @@ type Settler interface {
PlayerProfile(userID int64) (coins int64, rankTier string)
// ChargeTicket یک بلیت برای بُرِ مجدد در فازِ انتخابِ حکم مصرف می‌کند.
ChargeTicket(userID int64) error
// ChargeCoins/AwardCoins برای شرطِ سکه‌ایِ میزِ خصوصی (pot). Charge در صورتِ
// کمبودِ موجودی خطا می‌دهد؛ Award سکه را به برنده اضافه می‌کند.
ChargeCoins(userID int64, amount int64, ref string) error
AwardCoins(userID int64, amount int64, ref string)
// میز خصوصی (دورهمی).
ChargePrivateTable(userID int64) error // مصرفِ یک میز رایگان (خطا اگر سقف پر باشد)
PrivateTableInfo(userID int64) (remaining int, unlimited bool)
@@ -36,6 +40,8 @@ func (noopSettler) RecordCut(int64) {}
func (noopSettler) RecordGameResult(int64, bool) {}
func (noopSettler) PlayerProfile(int64) (int64, string) { return 0, "" }
func (noopSettler) ChargeTicket(int64) error { return nil }
func (noopSettler) ChargeCoins(int64, int64, string) error { return nil }
func (noopSettler) AwardCoins(int64, int64, string) {}
func (noopSettler) ChargePrivateTable(int64) error { return nil }
func (noopSettler) PrivateTableInfo(int64) (int, bool) { return 0, true }
func (noopSettler) TargetHands(string) int { return 7 }