func (c *connection) writer(wg *sync.WaitGroup, wsConn *websocket.Conn) {
	defer wg.Done()
	for range c.doBroadcast {
		sendGameStateToConnection(wsConn, c)
	}
}
writer broadcasts the current gameState to the two players in a connectionPair
package main
import (
	"github.com/gorilla/websocket"
	"log"
	"net/http"
	"strconv"
	"sync"
)
var connections []*connectionPair
type connection struct {
	doBroadcast chan bool
	cp *connectionPair
	playerNum int
}
type wsHandler struct{}
func (c *connection) reader(wg *sync.WaitGroup, wsConn *websocket.Conn) {
	defer wg.Done()
	for {
		_, clientMoveMessage, err := wsConn.ReadMessage()
		if err != nil {
			break
		}
		field, _ := strconv.ParseInt(string(clientMoveMessage[:]), 10, 32)  
		c.cp.gs.makeMove(c.playerNum, int(field))
		c.cp.receiveMove <- true  
	}
}