logging and infinite melee
This commit is contained in:
@@ -45,7 +45,6 @@ func NewGame(id string, width, height float64) *game {
|
||||
}
|
||||
|
||||
func (g *game) run() {
|
||||
started := false
|
||||
var t0, t1 time.Time
|
||||
payload := bot.NewBoardstate()
|
||||
for {
|
||||
@@ -61,7 +60,6 @@ func (g *game) run() {
|
||||
return
|
||||
case p := <-g.register:
|
||||
g.players[p] = true
|
||||
started = true
|
||||
case p := <-g.unregister:
|
||||
delete(g.players, p)
|
||||
close(p.send)
|
||||
@@ -74,9 +72,6 @@ func (g *game) run() {
|
||||
// XXX: This is very racy!! It was at bottom of loop and empty
|
||||
// stuff was going out
|
||||
payload.EmptySlices()
|
||||
if started && len(g.players) == 0 {
|
||||
g.kill <- true
|
||||
}
|
||||
|
||||
g.turn++
|
||||
payload.Turn = g.turn
|
||||
|
||||
Reference in New Issue
Block a user