Re-order some World members
This commit is contained in:
parent
065f79cbb3
commit
97d3be000b
1 changed files with 8 additions and 11 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Reference in a new issue