action

package
v0.0.0-...-76eb773 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action interface {
	fmt.Stringer
	ActionType() ActionType
	Tick() int
}

type ActionType

type ActionType int
const (
	ActionTypeUnknown ActionType = iota
	ActionTypePickup
	ActionTypeAdded
	ActionTypeSelectShip
	ActionTypeHyper
	ActionTypeLevelUp
	ActionTypeScrap
	ActionTypeAttack
	ActionTypeRepair
	ActionTypeSelfRep
	ActionTypeChangeShip
	ActionTypeAutoRep
)

type Added

type Added struct {
	PilotName string
	// contains filtered or unexported fields
}

func AddedFromCSVRecord

func AddedFromCSVRecord(record []string) (*Added, error)

func (*Added) ActionType

func (a *Added) ActionType() ActionType

func (*Added) String

func (a *Added) String() string

func (*Added) Tick

func (a *Added) Tick() int

type Attack

type Attack struct {
	Outgoing                 bool
	EnemyPilot               string
	TargetDamage             int
	TargetHitpointsRemaining int

	// Round 43+
	PlayerDamageTaken        int
	PlayerHitpointsRemaining int
	// contains filtered or unexported fields
}

func AttackFromCSVRecord

func AttackFromCSVRecord(record []string, myPlayer *common.Player) (*Attack, error)

func (*Attack) ActionType

func (a *Attack) ActionType() ActionType

func (*Attack) IsDeath

func (a *Attack) IsDeath() bool

func (*Attack) IsKill

func (a *Attack) IsKill() bool

func (*Attack) IsSuicidalAttack

func (a *Attack) IsSuicidalAttack() bool

func (*Attack) String

func (a *Attack) String() string

func (*Attack) Tick

func (a *Attack) Tick() int

type Hyper

type Hyper struct {
	Location  string
	Autopilot bool
	// contains filtered or unexported fields
}

func HyperFromCSVRecord

func HyperFromCSVRecord(record []string) (*Hyper, error)

func (*Hyper) ActionType

func (h *Hyper) ActionType() ActionType

func (*Hyper) String

func (h *Hyper) String() string

func (*Hyper) Tick

func (h *Hyper) Tick() int

type LevelUp

type LevelUp struct {
	Level common.ShipLevel
	// contains filtered or unexported fields
}

func LevelUpFromCSVRecord

func LevelUpFromCSVRecord(record []string) (*LevelUp, error)

func (*LevelUp) ActionType

func (l *LevelUp) ActionType() ActionType

func (*LevelUp) String

func (l *LevelUp) String() string

func (*LevelUp) Tick

func (l *LevelUp) Tick() int

type Pickup

type Pickup struct {
	Type PickupType
	// contains filtered or unexported fields
}

func PickupFromCSVRecord

func PickupFromCSVRecord(record []string) (*Pickup, error)

func (*Pickup) ActionType

func (p *Pickup) ActionType() ActionType

func (*Pickup) String

func (p *Pickup) String() string

func (*Pickup) Tick

func (p *Pickup) Tick() int

type PickupType

type PickupType int
const (
	PTNone PickupType = iota
	PTFreeAttack
	PTTripleAttack
	PTExplosive50
	PTExplosive250
	PTExplosive450
	PTRepair150
	PTRepair200
	PTRepair300
	PTPoints100
	PTPoints150
	PTPoints250
	PTPoints300
	PTInvulnerability
	PTHalfMaxRepair
	PTGateIntel
	PTDecoy
	PTRandomHyperGate
)

func (PickupType) String

func (pt PickupType) String() string

type Repair

type Repair struct {
	Outgoing                 bool
	FriendlyPilot            string
	TargetHitpoints          int
	TargetHitpointsRemaining int

	// Round 43+
	PlayerDamageTaken        int
	PlayerHitpointsRemaining int
	// contains filtered or unexported fields
}

func RepairFromCSVRecord

func RepairFromCSVRecord(record []string, myPlayer *common.Player) (*Repair, error)

func (*Repair) ActionType

func (r *Repair) ActionType() ActionType

func (*Repair) IsSuicidalRepair

func (r *Repair) IsSuicidalRepair() bool

func (*Repair) String

func (r *Repair) String() string

func (*Repair) Tick

func (r *Repair) Tick() int

type Scrap

type Scrap struct {
	Type   ScrapActionType
	Amount int
	// contains filtered or unexported fields
}

func ScrapFromCSVRecord

func ScrapFromCSVRecord(record []string) (*Scrap, error)

func (*Scrap) ActionType

func (s *Scrap) ActionType() ActionType

func (*Scrap) String

func (s *Scrap) String() string

func (*Scrap) Tick

func (s *Scrap) Tick() int

type ScrapActionType

type ScrapActionType int
const (
	ScrapActionTypeUnknown ScrapActionType = iota
	ScrapActionTypeRetrieved
	ScrapActionTypeDumped
)

type SelectShip

type SelectShip struct {
	ShipType string
	// contains filtered or unexported fields
}

func SelectShipFromCSVRecord

func SelectShipFromCSVRecord(record []string) (*SelectShip, error)

func (*SelectShip) ActionType

func (s *SelectShip) ActionType() ActionType

func (*SelectShip) String

func (s *SelectShip) String() string

func (*SelectShip) Tick

func (s *SelectShip) Tick() int

type SelfRep

type SelfRep struct {
	// contains filtered or unexported fields
}

func SelfRepFromCSVRecord

func SelfRepFromCSVRecord(record []string) (*SelfRep, error)

func (*SelfRep) ActionType

func (s *SelfRep) ActionType() ActionType

func (*SelfRep) String

func (s *SelfRep) String() string

func (*SelfRep) Tick

func (s *SelfRep) Tick() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL