rove/pkg/game/rover.go

31 lines
732 B
Go
Raw Normal View History

2020-06-06 16:53:42 +01:00
package game
import (
"github.com/google/uuid"
"github.com/mdiluz/rove/pkg/vector"
)
2020-06-06 16:53:42 +01:00
// RoverAttributes contains attributes of a rover
type RoverAttributes struct {
// Name of this rover
Name string `json:"name"`
2020-06-06 16:53:42 +01:00
// Range represents the distance the unit's radar can see
Range int `json:"range"`
}
// Rover describes a single rover in the world
type Rover struct {
// Id is a unique ID for this rover
Id uuid.UUID `json:"id"`
2020-06-26 18:22:37 +01:00
// Pos represents where this rover is in the world
Pos vector.Vector `json:"pos"`
2020-06-06 16:53:42 +01:00
// Attributes represents the physical attributes of the rover
Attributes RoverAttributes `json:"attributes"`
2020-06-26 18:13:23 +01:00
// Inventory represents any items the rover is carrying
Inventory []Item `json:"inventory"`
2020-06-06 16:53:42 +01:00
}