mchess-server/server/player.go

23 lines
299 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
InGame bool
}
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,
}
}