func (bmc *BuildingMorphCmd) Params(verbose bool) string {
	return fmt.Sprintf(
		c(verbose,
			"Unit: %v",
			"%v",
		),
		bmc.Unit,
	)
}
Params implements Cmd.Params().
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)
}
func (ut UnitTag) Valid() bool {
	return ut != 0xffff
}
type GeneralCmd struct {
	*Base
	Data []byte
}
func (gc *GeneralCmd) Params(verbose bool) string {
	return fmt.Sprintf(
		c(verbose,
			"Data: [% x]",
			"[% x]",
		),
		gc.Data,
	)
}
type SelectCmd struct {
	*Base
	UnitTags []UnitTag
}
func (sc *SelectCmd) Params(verbose bool) string {
	return fmt.Sprintf(
		c(verbose,
			"UnitTags: %x",
			"%x",
		),
		sc.UnitTags,
	)
}
type BuildCmd struct {
	*Base
	Order *Order
	Pos repcore.Point
	Unit *Unit
}
func (bc *BuildCmd) Params(verbose bool) string {
	if verbose {
		return fmt.Sprintf("Order: %v, Pos: (%v), Unit: %v", bc.Order, bc.Pos, bc.Unit)
	}
	return fmt.Sprintf("(%v), %v", bc.Pos, bc.Unit)
}
type GameSpeedCmd struct {
	*Base
	Speed *repcore.Speed
}
func (gc *GameSpeedCmd) Params(verbose bool) string {
	return fmt.Sprintf(
		c(verbose,
			"Speed: %v",
			"%v",
		),
		gc.Speed,
	)
}
type HotkeyCmd struct {
	*Base
	HotkeyType *HotkeyType
	Group byte
}
func (hc *HotkeyCmd) Params(verbose bool) string {
	return fmt.Sprintf(
		c(verbose,
			"HotkeyType: %v, Group: %d",
			"%v, %d",
		),
		hc.HotkeyType, hc.Group,
	)
}
type LeaveGameCmd struct {
	*Base
	Reason *LeaveReason
}
func (lgc *LeaveGameCmd) Params(verbose bool) string {
	return fmt.Sprintf(
		c(verbose,
			"Reason: %v",
			"%v",
		), lgc.Reason,
	)
}
type TrainCmd struct {
	*Base
	Unit *Unit
}
func (tc *TrainCmd) Params(verbose bool) string {
	return fmt.Sprintf(
		c(verbose,
			"Unit: %v",
			"%v",
		),
		tc.Unit,
	)
}
type QueueableCmd struct {
	*Base
	Queued bool
}
func (qc *QueueableCmd) Params(verbose bool) string {
	if verbose {
		return fmt.Sprintf("Queued: %t", qc.Queued)
	}
	if qc.Queued {
		return "Queued"
	}
	return ""
}
type RightClickCmd struct {
	*Base
	Pos repcore.Point
	UnitTag UnitTag
	Unit *Unit
	Queued bool
}
func (rcc *RightClickCmd) Params(verbose bool) string {
	if verbose {
		return fmt.Sprintf("Pos: (%v), UnitTag: %x, Unit: %v, Queued: %t", rcc.Pos, rcc.UnitTag, rcc.Unit, rcc.Queued)
	}
	b := &strings.Builder{}
	fmt.Fprintf(b, "(%v)", rcc.Pos)
	if rcc.UnitTag != 0 {
		fmt.Fprintf(b, ", %x", rcc.UnitTag)
	}
	if rcc.Unit.ID != UnitIDNone {
		fmt.Fprintf(b, ", %v", rcc.Unit)
	}
	if rcc.Queued {
		b.WriteString(", Queued")
	}
	return b.String()
}
type UnloadCmd struct {
	*Base
	UnitTag UnitTag
}
func (uc *UnloadCmd) Params(verbose bool) string {
	return fmt.Sprintf(
		c(verbose,
			" UnitTag: %x",
			"%x",
		),
		uc.UnitTag,
	)
}
type TargetedOrderCmd struct {
	*Base
	Pos repcore.Point
	UnitTag UnitTag
	Unit *Unit
	Order *Order
	Queued bool
}
func (toc *TargetedOrderCmd) Params(verbose bool) string {
	if verbose {
		return fmt.Sprintf("Pos: (%v), UnitTag: %x, Unit: %v, Order: %v, Queued: %t", toc.Pos, toc.UnitTag, toc.Unit, toc.Order, toc.Queued)
	}
	b := &strings.Builder{}
	fmt.Fprintf(b, "(%v)", toc.Pos)
	if toc.UnitTag != 0 {
		fmt.Fprintf(b, ", %x", toc.UnitTag)
	}
	if toc.Unit.ID != UnitIDNone {
		fmt.Fprintf(b, ", %v", toc.Unit)
	}
	fmt.Fprintf(b, ", %v", toc.Order)
	if toc.Queued {
		b.WriteString(", Queued")
	}
	return b.String()
}
type MinimapPingCmd struct {
	*Base
	Pos repcore.Point
}
func (mpc *MinimapPingCmd) Params(verbose bool) string {
	return fmt.Sprintf(
		c(verbose,
			"Pos: (%v)",
			"(%v)",
		),
		mpc.Pos,
	)
}
type ChatCmd struct {
	*Base
	SenderSlotID byte
	Message string
}
func (cc *ChatCmd) Params(verbose bool) string {
	return fmt.Sprintf(
		c(verbose,
			"SenderSlotID: %d, Message: %q",
			"%d, %q",
		),
		cc.SenderSlotID, cc.Message,
	)
}
type VisionCmd struct {
	*Base
	SlotIDs []byte
}
func (vc *VisionCmd) Params(verbose bool) string {
	return fmt.Sprintf(
		c(verbose,
			"SlotIDs: %v",
			"%v",
		),
		vc.SlotIDs,
	)
}
type AllianceCmd struct {
	*Base
	SlotIDs []byte
	AlliedVictory bool
}
func (ac *AllianceCmd) Params(verbose bool) string {
	if verbose {
		return fmt.Sprintf("SlotIDs: %v, AlliedVictory: %t", ac.SlotIDs, ac.AlliedVictory)
	}
	b := &strings.Builder{}
	fmt.Fprintf(b, "%v", ac.SlotIDs)
	if ac.AlliedVictory {
		b.WriteString(", AlliedVictory")
	}
	return b.String()
}
type CancelTrainCmd struct {
	*Base
	UnitTag UnitTag
}
func (ctc *CancelTrainCmd) Params(verbose bool) string {
	return fmt.Sprintf(
		c(verbose,
			"UnitTag: %x",
			"%x",
		),
		ctc.UnitTag,
	)
}
type BuildingMorphCmd struct {
	*Base
	Unit *Unit
}