From 4645ef81e53d54784ba746335beb9ddb27faff80 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sat, 6 Jun 2020 16:53:42 +0100 Subject: [PATCH] Add missing rover.go file --- pkg/game/rover.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pkg/game/rover.go diff --git a/pkg/game/rover.go b/pkg/game/rover.go new file mode 100644 index 0000000..6829de7 --- /dev/null +++ b/pkg/game/rover.go @@ -0,0 +1,27 @@ +package game + +import "github.com/google/uuid" + +// RoverAttributes contains attributes of a rover +type RoverAttributes struct { + // Speed represents the Speed that the rover will move per second + Speed int `json:"speed"` + + // Range represents the distance the unit's radar can see + Range int `json:"range"` + + // Name of this rover + Name string + + // Pos represents where this rover is in the world + Pos Vector `json:"pos"` +} + +// Rover describes a single rover in the world +type Rover struct { + // Id is a unique ID for this rover + Id uuid.UUID `json:"id"` + + // Attributes represents the physical attributes of the rover + Attributes RoverAttributes `json:"attributes"` +}