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"`
Speed int `json:"speed"`
Acceleration int `json:"acceleration"`
WeaponRadius int `json:"weapon_radius"`
ScannerRadius int `json:"scanner_radius"`
TurnSpeed int `json:"turn_speed"`
FireRate int `json:"fire_rate"`
WeaponRadius int `json:"weapon_radius"`
WeaponDamage int `json:"weapon_damage"`
WeaponSpeed int `json:"weapon_speed"`
}

13
main.go
View File

@ -12,9 +12,12 @@ import (
var hp = flag.Int("hp", 50, "")
var speed = flag.Int("speed", 50, "")
var acceleration = flag.Int("acceleration", 50, "")
var weaponRadius = flag.Int("wrad", 50, "weapon 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 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
@ -51,12 +54,12 @@ func main() {
Hp: *hp,
Speed: *speed,
Acceleration: *acceleration,
WeaponRadius: *weaponRadius,
ScannerRadius: *scannerRadius,
TurnSpeed: 50,
TurnSpeed: *turnSpeed,
FireRate: *fireRate,
WeaponDamage: 50,
WeaponSpeed: 50,
WeaponRadius: *weaponRadius,
WeaponDamage: *weaponDamage,
WeaponSpeed: *weaponSpeed,
},
}
log.Printf("my robot: %+v", r)