feat: add messages feature

This commit is contained in:
2026-06-25 01:11:13 +03:30
parent 27c20b1d34
commit 9a86d2bd4d
4 changed files with 100 additions and 1 deletions
+10
View File
@@ -12,6 +12,16 @@ type inboundMsg struct {
Code string `json:"code"` // برای join_table: شماره میز خصوصی
Hands int `json:"hands"` // برای start_table: تعداد دستِ بازیِ خصوصی (۳/۵/۷)
Dir int `json:"dir"` // برای rotate_table: جهتِ چرخشِ جایگاه‌ها (+۱/−۱)
Text string `json:"text"` // برای chat: متنِ پیامِ آماده
Emoji string `json:"emoji"` // برای chat: شناسه/کاراکترِ شکلک
}
// chatMsg پیامِ چت/شکلکِ یک بازیکن که برای همه‌ی میز پخش می‌شود.
type chatMsg struct {
Type string `json:"type"` // "chat"
Seat int `json:"seat"`
Text string `json:"text,omitempty"`
Emoji string `json:"emoji,omitempty"`
}
// lobbyPlayer یک بازیکن در اتاق انتظارِ میز خصوصی.