tweaks in support of better rendering
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user