Skip to content

Instantly share code, notes, and snippets.

@BenJuan26
Created April 17, 2020 03:08
Show Gist options
  • Save BenJuan26/0a8dbd2abfaa2b060e510c9325416cdb to your computer and use it in GitHub Desktop.
Save BenJuan26/0a8dbd2abfaa2b060e510c9325416cdb to your computer and use it in GitHub Desktop.
// Status represents the current state of the player and ship.
type Status struct {
Timestamp string `json:"timestamp"`
Event string `json:"event"`
// Naming this 'RawFlags' since it will only really by used until
// the values are extracted into the Flags below.
RawFlags uint32 `json:"Flags"`
// The actual flag values will be set by parsing RawFlags.
// Including the json tag "-" so that it doesn't get written to JSON later.
Flags StatusFlags `json:"-"`
Pips [3]int32 `json:"Pips"`
FireGroup int32 `json:"FireGroup"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment