first pass at repair mode

This commit is contained in:
Fraser Graham
2013-11-06 22:50:59 -08:00
parent cfd3d91942
commit 082b737805
2 changed files with 52 additions and 25 deletions
+15 -13
View File
@@ -5,19 +5,20 @@ import (
)
type Robot struct {
Id string `json:"id"`
Name string `json:"name"`
Stats Stats `json:"-"`
TargetSpeed float32 `json:"-"`
Speed float32 `json:"speed"`
Health int `json:"health"`
Position v.Point2d `json:"position"`
Heading v.Vector2d `json:"heading"`
MoveTo *v.Point2d `json:"-"`
FireAt *v.Point2d `json:"-"`
Scanners []Scanner `json:"scanners"`
LastFired int `json:"-"`
Collision bool `json:"collision"`
Id string `json:"id"`
Name string `json:"name"`
Stats Stats `json:"-"`
TargetSpeed float32 `json:"-"`
Speed float32 `json:"speed"`
Health int `json:"health"`
RepairCounter float32 `json:"repair"`
Position v.Point2d `json:"position"`
Heading v.Vector2d `json:"heading"`
MoveTo *v.Point2d `json:"-"`
FireAt *v.Point2d `json:"-"`
Scanners []Scanner `json:"scanners"`
LastFired int `json:"-"`
Collision bool `json:"collision"`
}
// This is the subset of data we send to players about robots
@@ -157,5 +158,6 @@ type Instruction struct {
MoveTo *v.Point2d `json:"move_to,omitempty"`
FireAt *v.Point2d `json:"fire_at,omitempty"`
TargetSpeed *float32 `json:"target_speed,omitempty"`
Repair *bool `json:"repair,omitempty"`
Stats Stats `json:"stats"`
}