active scanning

This commit is contained in:
Fraser Graham
2013-11-07 21:34:54 -08:00
parent 3d0eb16f91
commit 1b42a19393
3 changed files with 31 additions and 5 deletions
+5
View File
@@ -7,11 +7,14 @@ import (
type Robot struct {
Id string `json:"id"`
Name string `json:"name"`
Message string `json:"-"`
Stats Stats `json:"-"`
TargetSpeed float32 `json:"-"`
Speed float32 `json:"speed"`
Health int `json:"health"`
RepairCounter float32 `json:"repair"`
ScanCounter float32 `json:"scan_bonus"`
ActiveScan bool `json:"-"`
Position v.Point2d `json:"position"`
Heading v.Vector2d `json:"heading"`
MoveTo *v.Point2d `json:"-"`
@@ -158,10 +161,12 @@ func (s StatsRequest) Valid() bool {
}
type Instruction struct {
Message *string `json:"message,omitempty"`
MoveTo *v.Point2d `json:"move_to,omitempty"`
FireAt *v.Point2d `json:"fire_at,omitempty"`
Probe *v.Point2d `json:"probe,omitempty"`
TargetSpeed *float32 `json:"target_speed,omitempty"`
Repair *bool `json:"repair,omitempty"`
Scan *bool `json:"scan,omitempty"`
Stats Stats `json:"stats"`
}