Added some debug logging
This commit is contained in:
parent
e02dc2f348
commit
ed39916f17
8
robot.go
8
robot.go
@ -126,6 +126,7 @@ func (r *robot) negociate() (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
log.Printf("%s: recv stats", r.name)
|
||||
|
||||
// this player only ever has one robot, so we're just picking off our own
|
||||
// stats
|
||||
@ -151,11 +152,18 @@ func (r *robot) play() {
|
||||
|
||||
for {
|
||||
r.speed = float32(maxSpeed)
|
||||
if *verbose {
|
||||
log.Printf("%s: about to wait on boardstate", r.name)
|
||||
}
|
||||
err = websocket.JSON.Receive(r.ws, &r.boardstate)
|
||||
if *verbose {
|
||||
log.Printf("%s: one recv boardstate", r.name)
|
||||
}
|
||||
if err != nil {
|
||||
log.Printf("%s: Connection lost", r.name)
|
||||
return
|
||||
}
|
||||
// TODO: I need a truly-verbose flag?
|
||||
// if *verbose {
|
||||
// log.Printf("\n\n%#v\n\n", r.boardstate)
|
||||
// }
|
||||
|
Loading…
Reference in New Issue
Block a user