20 lines
285 B
Go
20 lines
285 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,
|
|
}
|
|
}
|
|
|
|
func (player *Player) movePlayerToGame(game chessGame) {
|
|
|
|
}
|