go fmt
This commit is contained in:
parent
7997b15c26
commit
4e4750fa95
4
game.go
4
game.go
@ -15,8 +15,8 @@ type game struct {
|
|||||||
id chan int
|
id chan int
|
||||||
turn int
|
turn int
|
||||||
spectators map[*Spectator]bool
|
spectators map[*Spectator]bool
|
||||||
sregister chan *Spectator
|
sregister chan *Spectator
|
||||||
sunregister chan *Spectator
|
sunregister chan *Spectator
|
||||||
}
|
}
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
2
main.go
2
main.go
@ -113,7 +113,7 @@ func addPlayer(ws *websocket.Conn) {
|
|||||||
send: make(chan *boardstate),
|
send: make(chan *boardstate),
|
||||||
ws: ws,
|
ws: ws,
|
||||||
}
|
}
|
||||||
p.reset()
|
p.reset()
|
||||||
g.register <- p
|
g.register <- p
|
||||||
defer func() {
|
defer func() {
|
||||||
g.unregister <- p
|
g.unregister <- p
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Spectator struct {
|
type Spectator struct {
|
||||||
ws *websocket.Conn
|
ws *websocket.Conn
|
||||||
send chan *boardstate
|
send chan *boardstate
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Spectator) sender() {
|
func (s *Spectator) sender() {
|
||||||
|
Loading…
Reference in New Issue
Block a user