mchess-server/server/player.go

22 lines
281 B
Go
Raw Normal View History

package server
2023-04-18 20:19:28 +00:00
import (
"github.com/google/uuid"
"nhooyr.io/websocket"
2023-04-18 20:19:28 +00:00
)
type Player struct {
Uuid uuid.UUID
Conn websocket.Conn
}
type PlayerInfo struct {
PlayerID uuid.UUID `json:"playerID"`
}
2023-04-18 20:19:28 +00:00
func NewPlayer(uuid uuid.UUID) *Player {
return &Player{
Uuid: uuid,
}
}