Remove spurious logging
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"golang.org/x/net/websocket"
|
||||
|
||||
@@ -28,7 +27,6 @@ type Client struct {
|
||||
Port int
|
||||
Server string
|
||||
StatsReq server.StatsRequest
|
||||
Verbose bool
|
||||
Game server.GameParam
|
||||
|
||||
boardstate *server.Boardstate
|
||||
@@ -55,9 +53,6 @@ type decoder interface {
|
||||
|
||||
// Negociate runs through the hackerbots negociation protocol.
|
||||
func (c *Client) Negociate(clientType string) (err error) {
|
||||
if c.Verbose {
|
||||
log.Printf("%s: trying to connect to game '%s'", c.Name, c.GameId)
|
||||
}
|
||||
c.ws, err = connect(c.Server, c.Port)
|
||||
if err != nil {
|
||||
return errors.New(fmt.Sprintf("connection failure: %s", err))
|
||||
@@ -80,9 +75,6 @@ func (c *Client) Negociate(clientType string) (err error) {
|
||||
if err != nil || idreq.Type == "failure" {
|
||||
return errors.New(fmt.Sprintf("failure: %+v", idreq))
|
||||
}
|
||||
if c.Verbose {
|
||||
log.Printf("%s: idreq: %+v", c.Name, idreq)
|
||||
}
|
||||
|
||||
err = websocket.JSON.Send(c.ws, struct {
|
||||
Type string `json:"type"`
|
||||
@@ -110,9 +102,6 @@ func (c *Client) Negociate(clientType string) (err error) {
|
||||
if c.Game.Type != "gameparam" {
|
||||
return errors.New("didn't receive a good gameparam")
|
||||
}
|
||||
if c.Verbose {
|
||||
log.Printf("%s: game parameters: %+v", c.Name, c.Game)
|
||||
}
|
||||
|
||||
if c.Game.Encoding == "json" {
|
||||
c.enc = json.NewEncoder(c.ws)
|
||||
@@ -130,9 +119,6 @@ func (c *Client) Negociate(clientType string) (err error) {
|
||||
c.Name: c.StatsReq,
|
||||
},
|
||||
}
|
||||
if c.Verbose {
|
||||
log.Printf("%s: client config: %+v", c.Name, conf)
|
||||
}
|
||||
|
||||
err = websocket.JSON.Send(c.ws, conf)
|
||||
|
||||
@@ -146,9 +132,6 @@ func (c *Client) Negociate(clientType string) (err error) {
|
||||
if !handshake.Success {
|
||||
return errors.New(handshake.Reason)
|
||||
}
|
||||
if c.Verbose {
|
||||
log.Printf("%s: handshake: %+v", c.Name, handshake)
|
||||
}
|
||||
|
||||
// we don't do anything useful with dstats, but could be interesting to
|
||||
// pass along to the player?
|
||||
@@ -173,8 +156,6 @@ func (c *Client) Negociate(clientType string) (err error) {
|
||||
// server, and passes this along to the embedded Player. Following this it
|
||||
// sends the server the Player's instruction.
|
||||
func (c *Client) Play() error {
|
||||
log.Printf("%s: starting loop", c.Name)
|
||||
|
||||
bs := &server.Boardstate{}
|
||||
var err error
|
||||
for {
|
||||
|
||||
Reference in New Issue
Block a user