logging and infinite melee

This commit is contained in:
sm
2013-09-27 00:03:32 -07:00
parent 13c0cd047b
commit 472e2011b9
3 changed files with 9 additions and 7 deletions
-5
View File
@@ -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