diff --git a/pkg/rove/world.go b/pkg/rove/world.go index 490747b..dcb39ea 100644 --- a/pkg/rove/world.go +++ b/pkg/rove/world.go @@ -18,32 +18,29 @@ import ( // World describes a self contained universe and everything in it type World struct { + // TicksPerDay is the amount of ticks in a single day + TicksPerDay int `json:"ticks-per-day"` + + // Current number of ticks from the start + CurrentTicks int `json:"current-ticks"` + // Rovers is a id->data map of all the rovers in the game Rovers map[string]Rover `json:"rovers"` // Atlas represends the world map of chunks and tiles Atlas atlas.Atlas `json:"atlas"` - // Mutex to lock around all world operations - worldMutex sync.RWMutex - // Commands is the set of currently executing command streams per rover CommandQueue map[string]CommandStream `json:"commands"` - // Incoming represents the set of commands to add to the queue at the end of the current tick CommandIncoming map[string]CommandStream `json:"incoming"` + // Mutex to lock around all world operations + worldMutex sync.RWMutex // Mutex to lock around command operations cmdMutex sync.RWMutex - // Set of possible words to use for names words []string - - // TicksPerDay is the amount of ticks in a single day - TicksPerDay int `json:"ticks-per-day"` - - // Current number of ticks from the start - CurrentTicks int `json:"current-ticks"` } var wordsFile = os.Getenv("WORDS_FILE")