added missing stats flags

This commit is contained in:
Stephen McQuay 2013-11-11 00:24:11 -08:00
parent 819ba2f46d
commit 46947bb4b3
2 changed files with 9 additions and 6 deletions

View File

@ -24,10 +24,10 @@ type StatsRequest struct {
Hp int `json:"hp"` Hp int `json:"hp"`
Speed int `json:"speed"` Speed int `json:"speed"`
Acceleration int `json:"acceleration"` Acceleration int `json:"acceleration"`
WeaponRadius int `json:"weapon_radius"`
ScannerRadius int `json:"scanner_radius"` ScannerRadius int `json:"scanner_radius"`
TurnSpeed int `json:"turn_speed"` TurnSpeed int `json:"turn_speed"`
FireRate int `json:"fire_rate"` FireRate int `json:"fire_rate"`
WeaponRadius int `json:"weapon_radius"`
WeaponDamage int `json:"weapon_damage"` WeaponDamage int `json:"weapon_damage"`
WeaponSpeed int `json:"weapon_speed"` WeaponSpeed int `json:"weapon_speed"`
} }

13
main.go
View File

@ -12,9 +12,12 @@ import (
var hp = flag.Int("hp", 50, "") var hp = flag.Int("hp", 50, "")
var speed = flag.Int("speed", 50, "") var speed = flag.Int("speed", 50, "")
var acceleration = flag.Int("acceleration", 50, "") var acceleration = flag.Int("acceleration", 50, "")
var weaponRadius = flag.Int("wrad", 50, "weapon radius")
var scannerRadius = flag.Int("srad", 50, "scanner radius") var scannerRadius = flag.Int("srad", 50, "scanner radius")
var turnSpeed = flag.Int("omega", 50, "turn speed")
var fireRate = flag.Int("fire-rate", 50, "scanner radius") var fireRate = flag.Int("fire-rate", 50, "scanner radius")
var weaponRadius = flag.Int("wrad", 50, "weapon radius")
var weaponDamage = flag.Int("wdamage", 50, "weapons umph")
var weaponSpeed = flag.Int("wspeed", 50, "weapons speed")
// XXX: add TurnSpeed, WeaponDamage, WeaponSpeed // XXX: add TurnSpeed, WeaponDamage, WeaponSpeed
@ -51,12 +54,12 @@ func main() {
Hp: *hp, Hp: *hp,
Speed: *speed, Speed: *speed,
Acceleration: *acceleration, Acceleration: *acceleration,
WeaponRadius: *weaponRadius,
ScannerRadius: *scannerRadius, ScannerRadius: *scannerRadius,
TurnSpeed: 50, TurnSpeed: *turnSpeed,
FireRate: *fireRate, FireRate: *fireRate,
WeaponDamage: 50, WeaponRadius: *weaponRadius,
WeaponSpeed: 50, WeaponDamage: *weaponDamage,
WeaponSpeed: *weaponSpeed,
}, },
} }
log.Printf("my robot: %+v", r) log.Printf("my robot: %+v", r)