mchess-server/server/player.go

23 lines
299 B
Go

package server
import (
"github.com/google/uuid"
"nhooyr.io/websocket"
)
type Player struct {
Uuid uuid.UUID
Conn *websocket.Conn
InGame bool
}
type PlayerInfo struct {
PlayerID uuid.UUID `json:"playerID"`
}
func NewPlayer(uuid uuid.UUID) *Player {
return &Player{
Uuid: uuid,
}
}