board

package
v0.0.0-...-9948f64 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	ElevatorFloor uint8
	// rethink layout. it's hard to apply moves with this layout.
	Objs      []object.Object
	ObjFloors []uint8
}

func Deserialize

func Deserialize(str string) (*Board, error)

func New

func New(objsToFloors map[object.Object]uint8) *Board

func NewWithElevatorStart

func NewWithElevatorStart(objsToFloors map[object.Object]uint8, elevatorStart uint8) *Board

func (*Board) AllMoves

func (b *Board) AllMoves() []*Move

func (*Board) Apply

func (b *Board) Apply(m *Move) *Board

func (*Board) Print

func (b *Board) Print()

func (*Board) Serialize

func (b *Board) Serialize() string

func (*Board) SuccessBoard

func (b *Board) SuccessBoard() *Board

type Move

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

func NewMove

func NewMove(dest uint8, objs ...object.Object) *Move

func (Move) String

func (m Move) String() string

Jump to

Keyboard shortcuts

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