From 46947bb4b3f0b8577675100434c26c7b607559c3 Mon Sep 17 00:00:00 2001 From: Stephen McQuay Date: Mon, 11 Nov 2013 00:24:11 -0800 Subject: [PATCH] added missing stats flags --- botserv.go | 2 +- main.go | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/botserv.go b/botserv.go index ab72cc0..55e46f8 100644 --- a/botserv.go +++ b/botserv.go @@ -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"` } diff --git a/main.go b/main.go index 50c8bc3..c0398f8 100644 --- a/main.go +++ b/main.go @@ -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)