examples

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StateReady it's ready.
	StateReady mm.State = 1

	// StateRiding it's riding.
	StateRiding mm.State = 2
)

Variables

This section is empty.

Functions

func WithState

func WithState(initial mm.State) func(*Vehicle)

WithState allows setting the initial state.

func WithStatePaths

func WithStatePaths(paths mm.Paths) func(*Vehicle)

WithStatePaths allows setting the state rules.

Types

type Vehicle

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

Vehicle is a little example.

func NewVehicle

func NewVehicle(options ...func(*Vehicle)) *Vehicle

NewVehicle creates a new vehicle.

func (*Vehicle) GetState

func (s *Vehicle) GetState() mm.State

GetState satisfies mm.GetState

func (*Vehicle) SetState

func (s *Vehicle) SetState(in mm.Group, to mm.State) error

SetState satisfies mm.SetState

Jump to

Keyboard shortcuts

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