Include robot Id in the Stats structure that gets sent back to the client
This commit is contained in:
@@ -33,8 +33,8 @@ type Robot struct {
|
||||
Hit bool `json:"hit"`
|
||||
Probe *v.Point2d `json:"probe"`
|
||||
ProbeResult *Collision `json:"probe_result"`
|
||||
gameStats *BotStats `json:"-"`
|
||||
Delta float64 `json:"-"`
|
||||
gameStats *BotStats
|
||||
Delta float64 `json:"-"`
|
||||
idg *idg.Generator
|
||||
}
|
||||
|
||||
@@ -101,6 +101,7 @@ func (s AllRobotSorter) Less(i, j int) bool {
|
||||
|
||||
// Stats is the point allocation for a Robot.
|
||||
type Stats struct {
|
||||
Id string
|
||||
Hp int `json:"hp"`
|
||||
Speed float64 `json:"speed"`
|
||||
Acceleration float64 `json:"acceleration"`
|
||||
|
||||
Reference in New Issue
Block a user