interaction

package
v0.0.0-...-883f3e4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultTarget

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

A DefaultTarget wraps another target and

func NewDefaultTarget

func NewDefaultTarget(tgt Target, def Interaction) DefaultTarget

NewDefaultTarget wraps tgt, creating a target that provides def as the sole possible interaction when tgt reports none.

func (DefaultTarget) Interactions

func (t DefaultTarget) Interactions() []Interaction

type Interaction

type Interaction interface {
	Interact()
}

An Interaction is an instantaneous state change that can be applied to a target.

type Target

type Target interface {
	Interactions() []Interaction
}

A Target is something that might provide interactions to perform against it.

Any zero-length slice means the target has no available interactions right now.

Jump to

Keyboard shortcuts

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