go fmt
This commit is contained in:
parent
e7529e43d1
commit
db1afada10
7
main.go
7
main.go
@ -11,7 +11,6 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func connect() (*websocket.Conn, error) {
|
func connect() (*websocket.Conn, error) {
|
||||||
origin := "http://localhost/"
|
origin := "http://localhost/"
|
||||||
url := "ws://localhost:8666/ws/"
|
url := "ws://localhost:8666/ws/"
|
||||||
@ -26,8 +25,8 @@ func createGame() (string, error) {
|
|||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
var g struct {
|
var g struct {
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
}
|
}
|
||||||
if err := json.NewDecoder(resp.Body).Decode(&g); err != nil {
|
if err := json.NewDecoder(resp.Body).Decode(&g); err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
@ -70,7 +69,7 @@ func negociate(ws *websocket.Conn, gameid string) (err error) {
|
|||||||
err = websocket.JSON.Send(ws, &bot.Config{
|
err = websocket.JSON.Send(ws, &bot.Config{
|
||||||
gameid,
|
gameid,
|
||||||
bot.Stats{
|
bot.Stats{
|
||||||
// TODO: make these flags
|
// TODO: make these flags
|
||||||
Hp: 200,
|
Hp: 200,
|
||||||
Speed: 100,
|
Speed: 100,
|
||||||
WeaponRadius: 50,
|
WeaponRadius: 50,
|
||||||
|
Loading…
Reference in New Issue
Block a user