Marco
eb946b4267
1. Use maintained websocket framework 2. Introduce function that allows to register a websocket connection per player
16 lines
270 B
Go
16 lines
270 B
Go
package server
|
|
|
|
type Move struct {
|
|
StartSquare Coordinate `json:"startSquare"`
|
|
EndSquare Coordinate `json:"endSquare"`
|
|
}
|
|
|
|
type Coordinate struct {
|
|
Col int `json:"col"`
|
|
Row int `json:"row"`
|
|
}
|
|
|
|
func parseMove(received string) (*Move, error) {
|
|
return &Move{}, nil
|
|
}
|