added fireRate flag
This commit is contained in:
@@ -13,11 +13,13 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
var hp = flag.Int("hp", 150, "")
|
var hp = flag.Int("hp", 50, "")
|
||||||
var speed = flag.Float64("speed", 150, "")
|
var speed = flag.Float64("speed", 50, "")
|
||||||
var acceleration = flag.Float64("acceleration", 10, "")
|
var acceleration = flag.Float64("acceleration", 50, "")
|
||||||
var weaponRadius = flag.Int("wrad", 100, "weapon radius")
|
var weaponRadius = flag.Int("wrad", 50, "weapon radius")
|
||||||
var scannerRadius = flag.Int("srad", 100, "scanner radius")
|
var scannerRadius = flag.Int("srad", 50, "scanner radius")
|
||||||
|
var fireRate = flag.Int("fire-rate", 50, "scanner radius")
|
||||||
|
|
||||||
var server = flag.String("server", "hackerbots.us", "server hostname")
|
var server = flag.String("server", "hackerbots.us", "server hostname")
|
||||||
var port = flag.Int("port", 8666, "server port")
|
var port = flag.Int("port", 8666, "server port")
|
||||||
var botname = flag.String("name", "gobot", "the name that other players will see")
|
var botname = flag.String("name", "gobot", "the name that other players will see")
|
||||||
@@ -34,6 +36,7 @@ type Stats struct {
|
|||||||
Acceleration float64 `json:"acceleration"`
|
Acceleration float64 `json:"acceleration"`
|
||||||
WeaponRadius int `json:"weapon_radius"`
|
WeaponRadius int `json:"weapon_radius"`
|
||||||
ScannerRadius int `json:"scanner_radius"`
|
ScannerRadius int `json:"scanner_radius"`
|
||||||
|
FireRate int `json:"fire_rate"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Scanner struct {
|
type Scanner struct {
|
||||||
@@ -166,6 +169,7 @@ func negociate(ws *websocket.Conn, gameid string) (i *infos, err error) {
|
|||||||
Acceleration: *acceleration,
|
Acceleration: *acceleration,
|
||||||
WeaponRadius: *weaponRadius,
|
WeaponRadius: *weaponRadius,
|
||||||
ScannerRadius: *scannerRadius,
|
ScannerRadius: *scannerRadius,
|
||||||
|
FireRate: *fireRate,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user