fixed negotiate misspelling

This commit is contained in:
Stephen McQuay 2016-07-13 12:31:28 -06:00
parent 50be2c5b88
commit 3668c09235
No known key found for this signature in database
GPG Key ID: 1ABF428F71BAFC3D
3 changed files with 6 additions and 6 deletions

View File

@ -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)
}

View File

@ -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))

View File

@ -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)