diff --git a/game.go b/game.go index 4c1470d..411cf78 100644 --- a/game.go +++ b/game.go @@ -15,8 +15,8 @@ type game struct { id chan int turn int spectators map[*Spectator]bool - sregister chan *Spectator - sunregister chan *Spectator + sregister chan *Spectator + sunregister chan *Spectator } type Config struct { diff --git a/main.go b/main.go index 8c13cde..e9c93d6 100644 --- a/main.go +++ b/main.go @@ -113,7 +113,7 @@ func addPlayer(ws *websocket.Conn) { send: make(chan *boardstate), ws: ws, } - p.reset() + p.reset() g.register <- p defer func() { g.unregister <- p diff --git a/spectator.go b/spectator.go index 0ac0778..27aae5e 100644 --- a/spectator.go +++ b/spectator.go @@ -5,8 +5,8 @@ import ( ) type Spectator struct { - ws *websocket.Conn - send chan *boardstate + ws *websocket.Conn + send chan *boardstate } func (s *Spectator) sender() {