package state import "go.uber.org/zap/zapcore" // StorageCoordinates gives the coordinates of a cell in a form optimized for storage. type StorageCoordinates struct { // Line is the index from 0 to Lines - 1 of the HexLine in the HexLayer. Line uint8 `json:"line"` // Cell is the index from 0 to CellsPerLine - 1 of the HexCell in the HexLine. Cell uint8 `json:"cell"` } func (s StorageCoordinates) MarshalLogObject(encoder zapcore.ObjectEncoder) error { encoder.AddUint8("line", s.Line) encoder.AddUint8("cell", s.Cell) return nil }