Documentation ¶
Index ¶
- type ActorIDTyp
- type CombatAction
- type Intellect
- type Memory
- func (m *Memory) AddActorToLocation(zoneID, locID, actorID uuid.UUID)
- func (m *Memory) AddObjectToLocation(zoneID, locID, objectID uuid.UUID)
- func (m *Memory) AddObjectToObject(objectID, toObjID uuid.UUID)
- func (m *Memory) ClearLocationInfo()
- func (m *Memory) GetActorInfo(actorID uuid.UUID) (commands.ActorVisibleInfo, error)
- func (m *Memory) GetCurrentZoneAndLocationID() (uuid.UUID, uuid.UUID)
- func (m *Memory) GetLastAttacker() ActorIDTyp
- func (m *Memory) GetLocationInfo(zoneID, locID uuid.UUID) (commands.LocationInfo, error)
- func (m *Memory) GetNumActorsInLocation(zoneID, locID uuid.UUID) float64
- func (m *Memory) GetObjectInfo(objectID uuid.UUID) (commands.ObjectVisibleInfo, error)
- func (m *Memory) GetSecondsSinceLastAttacked() float64
- func (m *Memory) GetSecondsSinceLastMove() float64
- func (m *Memory) IsWeaponOnGround() bool
- func (m *Memory) RemoveActorFromLocation(zoneID, locID, actorID uuid.UUID)
- func (m *Memory) RemoveObjectFromLocation(zoneID, locID, objectID uuid.UUID)
- func (m *Memory) RemoveObjectFromObject(objectID, fromObjID uuid.UUID)
- func (m *Memory) SetActorInfo(info commands.ActorVisibleInfo)
- func (m *Memory) SetCurrentZoneAndLocationID(zoneID, locID uuid.UUID)
- func (m *Memory) SetLastAttackedTime(t time.Time)
- func (m *Memory) SetLastAttacker(attackerID ActorIDTyp)
- func (m *Memory) SetLastMovementTime(t time.Time)
- func (m *Memory) SetLocationInfo(info commands.LocationInfo)
- func (m *Memory) SetObjectInfo(info commands.ObjectVisibleInfo)
- type MessageSender
- type UtilityConsideration
- type UtilitySelection
- type UtilitySelector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActorIDTyp ¶
type ActorIDTyp uuid.UUID
func (ActorIDTyp) MarshalJSON ¶
func (a ActorIDTyp) MarshalJSON() ([]byte, error)
type CombatAction ¶
type CombatAction interface { CloneForAllValidTargets(startingState combatState, memory *Memory) []CombatAction FinalState() combatState TimeToExecute() float64 String() string Estimate(memory *Memory) float64 Execute(msgSender MessageSender, intellect *Intellect) error }
type Intellect ¶
type Intellect struct {
// contains filtered or unexported fields
}
func LoadIntellect ¶
func LoadIntellect(brainType string, msgSender MessageSender, actorID uuid.UUID) *Intellect
func (*Intellect) BlockUntilStopped ¶
func (i *Intellect) BlockUntilStopped()
func (*Intellect) HandleMessage ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
func NewMemory ¶
func NewMemory(msgSender MessageSender, intellect *Intellect) *Memory
func (*Memory) AddActorToLocation ¶
func (m *Memory) AddActorToLocation(zoneID, locID, actorID uuid.UUID)
func (*Memory) AddObjectToLocation ¶
func (m *Memory) AddObjectToLocation(zoneID, locID, objectID uuid.UUID)
func (*Memory) AddObjectToObject ¶
func (m *Memory) AddObjectToObject(objectID, toObjID uuid.UUID)
func (*Memory) ClearLocationInfo ¶
func (m *Memory) ClearLocationInfo()
func (*Memory) GetActorInfo ¶
func (m *Memory) GetActorInfo(actorID uuid.UUID) (commands.ActorVisibleInfo, error)
func (*Memory) GetCurrentZoneAndLocationID ¶
func (m *Memory) GetCurrentZoneAndLocationID() (uuid.UUID, uuid.UUID)
func (*Memory) GetLastAttacker ¶
func (m *Memory) GetLastAttacker() ActorIDTyp
func (*Memory) GetLocationInfo ¶
func (m *Memory) GetLocationInfo(zoneID, locID uuid.UUID) (commands.LocationInfo, error)
func (*Memory) GetNumActorsInLocation ¶
func (*Memory) GetObjectInfo ¶
func (m *Memory) GetObjectInfo(objectID uuid.UUID) (commands.ObjectVisibleInfo, error)
func (*Memory) GetSecondsSinceLastAttacked ¶
func (*Memory) GetSecondsSinceLastMove ¶
func (*Memory) IsWeaponOnGround ¶
func (*Memory) RemoveActorFromLocation ¶
func (m *Memory) RemoveActorFromLocation(zoneID, locID, actorID uuid.UUID)
func (*Memory) RemoveObjectFromLocation ¶
func (m *Memory) RemoveObjectFromLocation(zoneID, locID, objectID uuid.UUID)
func (*Memory) RemoveObjectFromObject ¶
func (m *Memory) RemoveObjectFromObject(objectID, fromObjID uuid.UUID)
func (*Memory) SetActorInfo ¶
func (m *Memory) SetActorInfo(info commands.ActorVisibleInfo)
func (*Memory) SetCurrentZoneAndLocationID ¶
func (m *Memory) SetCurrentZoneAndLocationID(zoneID, locID uuid.UUID)
func (*Memory) SetLastAttackedTime ¶
func (*Memory) SetLastAttacker ¶
func (m *Memory) SetLastAttacker(attackerID ActorIDTyp)
func (*Memory) SetLastMovementTime ¶
func (*Memory) SetLocationInfo ¶
func (m *Memory) SetLocationInfo(info commands.LocationInfo)
func (*Memory) SetObjectInfo ¶
func (m *Memory) SetObjectInfo(info commands.ObjectVisibleInfo)
type MessageSender ¶
type UtilityConsideration ¶
type UtilitySelection ¶
type UtilitySelection struct { Name string Weight float64 Considerations []UtilityConsideration }
type UtilitySelector ¶
type UtilitySelector struct {
Selections []UtilitySelection
}
Click to show internal directories.
Click to hide internal directories.