feat: add rotate private table

This commit is contained in:
2026-06-19 23:19:34 +03:30
parent cf043e2a19
commit 60494946d6
3 changed files with 93 additions and 23 deletions
+4
View File
@@ -10,12 +10,15 @@ type inboundMsg struct {
Suit string `json:"suit"` // برای choose_trump: hearts|spades|diamonds|clubs
Card string `json:"card"` // برای play_card: مثل "AS"
Code string `json:"code"` // برای join_table: شماره میز خصوصی
Hands int `json:"hands"` // برای start_table: تعداد دستِ بازیِ خصوصی (۳/۵/۷)
Dir int `json:"dir"` // برای rotate_table: جهتِ چرخشِ جایگاه‌ها (+۱/−۱)
}
// lobbyPlayer یک بازیکن در اتاق انتظارِ میز خصوصی.
type lobbyPlayer struct {
Name string `json:"name"`
Host bool `json:"host"`
Seat int `json:"seat"` // جایگاهِ مطلق (۰..۳)
}
// tableLobbyMsg وضعیت اتاق انتظارِ میز خصوصی (دورهمی).
@@ -24,6 +27,7 @@ type tableLobbyMsg struct {
Code string `json:"code"`
Players []lobbyPlayer `json:"players"`
Host bool `json:"host"` // آیا گیرنده میزبان است
YouSeat int `json:"you_seat"` // جایگاهِ مطلقِ گیرنده (برای چیدمانِ صحنه)
Remaining int `json:"remaining"` // باقیمانده‌ی میزهای رایگانِ گیرنده
Unlimited bool `json:"unlimited"`
}