Simplify - remove RoverAttributes and rover UUIDs
This commit is contained in:
parent
f9c30f541c
commit
1ed1c60de0
6 changed files with 89 additions and 138 deletions
|
@ -1,29 +1,19 @@
|
|||
package game
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/mdiluz/rove/pkg/vector"
|
||||
)
|
||||
|
||||
// RoverAttributes contains attributes of a rover
|
||||
type RoverAttributes struct {
|
||||
// Name of this rover
|
||||
Name string `json:"name"`
|
||||
|
||||
// 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"`
|
||||
// Unique name of this rover
|
||||
Name string `json:"name"`
|
||||
|
||||
// Pos represents where this rover is in the world
|
||||
Pos vector.Vector `json:"pos"`
|
||||
|
||||
// Attributes represents the physical attributes of the rover
|
||||
Attributes RoverAttributes `json:"attributes"`
|
||||
// Range represents the distance the unit's radar can see
|
||||
Range int `json:"range"`
|
||||
|
||||
// Inventory represents any items the rover is carrying
|
||||
Inventory []byte `json:"inventory"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue