feat: add private and profile
This commit is contained in:
+30
-1
@@ -4,11 +4,40 @@ import "hakemsho/internal/game"
|
||||
|
||||
// inboundMsg پیام دریافتی از کلاینت.
|
||||
type inboundMsg struct {
|
||||
Type string `json:"type"` // join_queue | choose_trump | play_card | leave
|
||||
Type string `json:"type"` // join_queue | choose_trump | play_card | leave | create_table | join_table | start_table | leave_table
|
||||
Mode string `json:"mode"` // برای join_queue
|
||||
Tier string `json:"tier"` // برای join_queue: نوع میز (beginner/pro/...)
|
||||
Suit string `json:"suit"` // برای choose_trump: hearts|spades|diamonds|clubs
|
||||
Card string `json:"card"` // برای play_card: مثل "AS"
|
||||
Code string `json:"code"` // برای join_table: شماره میز خصوصی
|
||||
}
|
||||
|
||||
// lobbyPlayer یک بازیکن در اتاق انتظارِ میز خصوصی.
|
||||
type lobbyPlayer struct {
|
||||
Name string `json:"name"`
|
||||
Host bool `json:"host"`
|
||||
}
|
||||
|
||||
// tableLobbyMsg وضعیت اتاق انتظارِ میز خصوصی (دورهمی).
|
||||
type tableLobbyMsg struct {
|
||||
Type string `json:"type"` // "table_lobby"
|
||||
Code string `json:"code"`
|
||||
Players []lobbyPlayer `json:"players"`
|
||||
Host bool `json:"host"` // آیا گیرنده میزبان است
|
||||
Remaining int `json:"remaining"` // باقیماندهی میزهای رایگانِ گیرنده
|
||||
Unlimited bool `json:"unlimited"`
|
||||
}
|
||||
|
||||
// countdownMsg شمارش معکوس پیش از شروع بازیِ خصوصی.
|
||||
type countdownMsg struct {
|
||||
Type string `json:"type"` // "countdown"
|
||||
Seconds int `json:"seconds"`
|
||||
}
|
||||
|
||||
// tableClosedMsg انحلالِ میز خصوصی پیش از شروع (میزبان خارج شد).
|
||||
type tableClosedMsg struct {
|
||||
Type string `json:"type"` // "table_closed"
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
// PlayerInfo اطلاعات عمومی یک بازیکن سر میز.
|
||||
|
||||
Reference in New Issue
Block a user