You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hexmap/server/state/coords.go

20 lines
549 B

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
}