tweaks in support of better rendering

This commit is contained in:
Fraser Graham
2013-10-28 23:35:00 -07:00
parent a4b539e79d
commit 1498414357
3 changed files with 8 additions and 5 deletions
+6 -4
View File
@@ -23,10 +23,11 @@ type Robot struct {
// This is the subset of data we send to players about robots
// that are not theirs.
type OtherRobot struct {
Id string `json:"id"`
Name string `json:"name"`
Position v.Point2d `json:"position"`
Health int `json:"health"`
Id string `json:"id"`
Name string `json:"name"`
Position v.Point2d `json:"position"`
Heading v.Vector2d `json:"heading"`
Health int `json:"health"`
}
func (r Robot) GetTruncatedDetails() OtherRobot {
@@ -34,6 +35,7 @@ func (r Robot) GetTruncatedDetails() OtherRobot {
Id: r.Id,
Name: r.Name,
Position: r.Position,
Heading: r.Heading,
Health: r.Health,
}
}