fixed negotiate misspelling
This commit is contained in:
parent
50be2c5b88
commit
3668c09235
@ -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)
|
||||
}
|
||||
|
||||
|
@ -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))
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user