func (ut UnitTag) Valid() bool {
	return ut != 0xffff
}
Valid tells if this is a valid unit tag.
package repcmd
import (
	"fmt"
	"strings"
	"github.com/icza/screp/rep/repcore"
)
func e(name string) repcore.Enum {
	return repcore.Enum{Name: name}
}
type Cmd interface {
	BaseCmd() *Base
	Params(verbose bool) string
}
type Base struct {
	Frame repcore.Frame
	PlayerID byte
	Type *Type
	IneffKind repcore.IneffKind `json:",omitempty"`
}
func (b *Base) BaseCmd() *Base {
	return b
}
func (b *Base) Params(verbose bool) string {
	return ""
}
func c(verbose bool, verboseFmt, nonVerboseFmt string) string {
	if verbose {
		return verboseFmt
	}
	return nonVerboseFmt
}
type ParseErrCmd struct {
	*Base
	PrevCmd Cmd
}
func (pec *ParseErrCmd) Params(verbose bool) string {
	prevBase := pec.PrevCmd.BaseCmd()
	return fmt.Sprintf(
		c(verbose,
			"PrevCmd: [Frame: %d, PlayerID: %d, Type: %s, Params: [%s]",
			"[%d, %d, %s, [%s]",
		),
		prevBase.Frame, prevBase.PlayerID, prevBase.Type, pec.PrevCmd.Params(verbose),
	)
}
type UnitTag uint16
func (ut UnitTag) Index() uint16 {
	return uint16(ut) & 0x7ff
}
func (ut UnitTag) Recycle() byte {
	return byte(uint16(ut) >> 12)
}