new arch
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m11s

This commit is contained in:
Smile Rex
2026-01-22 16:34:47 +03:00
parent 68ba9bb2e2
commit 4e04de5581
7 changed files with 45 additions and 31 deletions

19
src/models/protocol.go Normal file
View File

@@ -0,0 +1,19 @@
package models
type MsgType string
const (
InputMsgType MsgType = "input"
ChatMsgType MsgType = "chat"
)
type InputMessage struct {
PlayerID int64
DX float64 `json:"dx"`
DY float64 `json:"dy"`
}
type StateMessage struct {
Type MsgType `json:"type"`
Payload any `json:"payload"`
}