don't rename package without need.

This commit is contained in:
sm
2014-04-23 14:54:30 -07:00
parent b63780c2bc
commit bbfb2af4a9
3 changed files with 32 additions and 32 deletions
+10 -10
View File
@@ -7,7 +7,7 @@ import (
"fmt"
"log"
hbserver "bitbucket.org/hackerbots/server"
"bitbucket.org/hackerbots/server"
"code.google.com/p/go.net/websocket"
)
@@ -26,12 +26,12 @@ type Client struct {
Name string
Port int
Server string
StatsReq hbserver.StatsRequest
StatsReq server.StatsRequest
Verbose bool
Player Player
Game hbserver.GameParam
Game server.GameParam
boardstate hbserver.Boardstate
boardstate server.Boardstate
enc encoder
dec decoder
ws *websocket.Conn
@@ -114,9 +114,9 @@ func (c *Client) Negociate() (err error) {
c.dec = gob.NewDecoder(c.ws)
}
conf := hbserver.ClientConfig{
conf := server.ClientConfig{
ID: c.GameId,
Stats: map[string]hbserver.StatsRequest{
Stats: map[string]server.StatsRequest{
c.Name: c.StatsReq,
},
}
@@ -127,7 +127,7 @@ func (c *Client) Negociate() (err error) {
Id string `json:"id"`
Success bool `json:"success"`
Type string `json:"type"`
hbserver.Failure
server.Failure
}
websocket.JSON.Receive(c.ws, &handshake)
if !handshake.Success {
@@ -140,8 +140,8 @@ func (c *Client) Negociate() (err error) {
// we don't do anything useful with dstats, but could be interesting to
// pass along to the player?
dstats := struct {
Stats map[string]hbserver.Stats `json:"stats"`
Type string `json:"type"`
Stats map[string]server.Stats `json:"stats"`
Type string `json:"type"`
}{}
err = websocket.JSON.Receive(c.ws, &dstats)
if err != nil {
@@ -151,7 +151,7 @@ func (c *Client) Negociate() (err error) {
return nil
}
// Play contains the main game run loop. It gets a hbserver.Boardstate from the
// Play contains the main game run loop. It gets a server.Boardstate from the
// server, and passes this along to the embedded Player. Following this it
// sends the server the Player's instruction.
func (c *Client) Play() error {