From 3668c0923551349d467ba588705eec444164c80a Mon Sep 17 00:00:00 2001 From: stephen mcquay Date: Wed, 13 Jul 2016 12:31:28 -0600 Subject: [PATCH] fixed negotiate misspelling --- botspectate/main.go | 4 ++-- client.go | 6 +++--- gobot/main.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/botspectate/main.go b/botspectate/main.go index 83ca3c1..a817cf6 100644 --- a/botspectate/main.go +++ b/botspectate/main.go @@ -36,9 +36,9 @@ func main() { Player: client.Spectator{}, } var err error - err = c.Negociate("spectator") + err = c.Negotiate("spectator") if err != nil { - fmt.Fprintf(os.Stderr, "%s: failed to negociate: %s\n", c.Name, err) + fmt.Fprintf(os.Stderr, "%s: failed to negotiate: %s\n", c.Name, err) os.Exit(1) } diff --git a/client.go b/client.go index 002b79c..aecf94b 100644 --- a/client.go +++ b/client.go @@ -18,7 +18,7 @@ func connect(server string, port int) (*websocket.Conn, error) { } // Client keeps track of connection to server and has two interesting methods: -// Negociate and Play. Users of this struct will likely use most everything as +// Negotiate and Play. Users of this struct will likely use most everything as // is while defining their own Player to specify desired game play behavior. type Client struct { ForceJSON bool @@ -51,8 +51,8 @@ type decoder interface { Decode(v interface{}) error } -// Negociate runs through the hackerbots negociation protocol. -func (c *Client) Negociate(clientType string) (err error) { +// Negotiate runs through the hackerbots negociation protocol. +func (c *Client) Negotiate(clientType string) (err error) { c.ws, err = connect(c.Server, c.Port) if err != nil { return errors.New(fmt.Sprintf("connection failure: %s", err)) diff --git a/gobot/main.go b/gobot/main.go index f3767ae..8447126 100644 --- a/gobot/main.go +++ b/gobot/main.go @@ -62,7 +62,7 @@ func main() { Player: client.NewSimplePlayer(800, 600), } var err error - err = c.Negociate("robot") + err = c.Negotiate("robot") if err != nil { fmt.Fprintf(os.Stderr, "%s: failed to negociate: %s\n", c.Name, err) os.Exit(1)