16 lines
224 B
Go
16 lines
224 B
Go
|
package server
|
||
|
|
||
|
import "github.com/gorilla/websocket"
|
||
|
|
||
|
type Player struct {
|
||
|
name string
|
||
|
conn *websocket.Conn
|
||
|
}
|
||
|
|
||
|
func NewPlayer(name string, conn *websocket.Conn) *Player {
|
||
|
return &Player{
|
||
|
name: name,
|
||
|
conn: conn,
|
||
|
}
|
||
|
}
|