2022-12-14 21:19:47 +00:00
|
|
|
package server
|
|
|
|
|
|
|
|
import "github.com/gorilla/websocket"
|
|
|
|
|
|
|
|
type Player struct {
|
2022-12-14 22:16:51 +00:00
|
|
|
id int
|
2022-12-14 21:19:47 +00:00
|
|
|
conn *websocket.Conn
|
|
|
|
}
|
|
|
|
|
2022-12-14 22:16:51 +00:00
|
|
|
func NewPlayer(id int, conn *websocket.Conn) *Player {
|
2022-12-14 21:19:47 +00:00
|
|
|
return &Player{
|
2022-12-14 22:16:51 +00:00
|
|
|
id: id,
|
2022-12-14 21:19:47 +00:00
|
|
|
conn: conn,
|
|
|
|
}
|
|
|
|
}
|