skewb

package module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Skewb

Skewb implementation in GO.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CenterColorGetter

type CenterColorGetter interface {
	GetUpCenterColor() string
	GetFrontCenterColor() string
	GetRightCenterColor() string
	GetBackCenterColor() string
	GetLeftCenterColor() string
	GetDownCenterColor() string
}

type CenterDowner

type CenterDowner interface {
	CenterDown(color string) error
}

type CornerColors

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

type CornerColorsGetter

type CornerColorsGetter interface {
	GetUFRCornerColors() [3]string
	GetURBCornerColors() [3]string
	GetULFCornerColors() [3]string
	GetUBLCornerColors() [3]string
	GetDRFCornerColors() [3]string
	GetDBRCornerColors() [3]string
	GetDFLCornerColors() [3]string
	GetDLBCornerColors() [3]string
}

type Drawer

type Drawer interface {
	Draw(fileName string) error
}

type Equaler

type Equaler interface {
	Equal(other Skewber) bool
}

type ExactEqualer added in v0.2.0

type ExactEqualer interface {
	ExactEqual(other Skewber) bool
}

type FullMirrorer added in v0.3.0

type FullMirrorer interface {
	FullMirror(other Skewber) bool
}

type Mirrorer added in v0.3.0

type Mirrorer interface {
	OneLayerMirrorer
	FullMirrorer
}

type Move

type Move string
var (
	U            Move = "U"
	UPrime       Move = "U'"
	R            Move = "R"
	RPrime       Move = "R'"
	LittleR      Move = "r"
	LittleRPrime Move = "r'"
	B            Move = "B"
	BPrime       Move = "B'"
	LittleB      Move = "b"
	LittleBPrime Move = "b'"
	L            Move = "L"
	LPrime       Move = "L'"
	LittleL      Move = "l"
	LittleLPrime Move = "l'"
	F            Move = "F"
	FPrime       Move = "F'"
	LittleF      Move = "f"
	LittleFPrime Move = "f'"

	X      Move = "x"
	XPrime Move = "x'"
	X2     Move = "x2"
	Y      Move = "y"
	YPrime Move = "y'"
	Y2     Move = "y2"
	Z      Move = "z"
	ZPrime Move = "z'"
	Z2     Move = "z2"

	ErrWCAMove = errors.New("wca move is not supported; valid types are: \"U\", \"U'\" \"R\", \"R'\" \"B\", \"B'\" \"L\", \"L'\", \"x\", \"x'\", \"x2\", \"y\", \"y'\", \"y2\", \"z\", \"z'\", \"z2\"")
	ErrColor   = errors.New("color is not part of Skewb")
)

type MovesApplier

type MovesApplier interface {
	ApplyWCAMoves(wcaMoves string) error
	ApplyRubiskewbMoves(rubiskewbMoves string) error
}

type OneLayerMirrorer

type OneLayerMirrorer interface {
	OneLayerMirror(other Skewber, layerColor string) bool
}

type RubiskewbMovesApplier

type RubiskewbMovesApplier interface {
	ApplyRubiskewbMoves(rubiskewbMoves string) error
}

type Skewb

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

func New

func New(upColor, frontColor, rightColor, backColor, leftColor, downColor string) Skewb

func (*Skewb) ApplyRubiskewbMoves

func (s *Skewb) ApplyRubiskewbMoves(rubiskewbMoves string) error

func (*Skewb) ApplyWCAMoves

func (s *Skewb) ApplyWCAMoves(wcaMoves string) error

func (*Skewb) CenterDown

func (s *Skewb) CenterDown(color string) error

func (*Skewb) Draw

func (s *Skewb) Draw(fileName string) error

func (*Skewb) Equal

func (s *Skewb) Equal(other Skewber) bool

func (*Skewb) ExactEqual added in v0.2.0

func (s *Skewb) ExactEqual(other Skewber) bool

func (*Skewb) FullMirror added in v0.3.0

func (s *Skewb) FullMirror(other Skewber) bool

func (*Skewb) GetBackCenterColor

func (s *Skewb) GetBackCenterColor() string

func (*Skewb) GetDBRCornerColors

func (s *Skewb) GetDBRCornerColors() [3]string

func (*Skewb) GetDFLCornerColors

func (s *Skewb) GetDFLCornerColors() [3]string

func (*Skewb) GetDLBCornerColors

func (s *Skewb) GetDLBCornerColors() [3]string

func (*Skewb) GetDRFCornerColors

func (s *Skewb) GetDRFCornerColors() [3]string

func (*Skewb) GetDownCenterColor

func (s *Skewb) GetDownCenterColor() string

func (*Skewb) GetFrontCenterColor

func (s *Skewb) GetFrontCenterColor() string

func (*Skewb) GetLeftCenterColor

func (s *Skewb) GetLeftCenterColor() string

func (*Skewb) GetRightCenterColor

func (s *Skewb) GetRightCenterColor() string

func (*Skewb) GetUBLCornerColors

func (s *Skewb) GetUBLCornerColors() [3]string

func (*Skewb) GetUFRCornerColors

func (s *Skewb) GetUFRCornerColors() [3]string

func (*Skewb) GetULFCornerColors

func (s *Skewb) GetULFCornerColors() [3]string

func (*Skewb) GetURBCornerColors

func (s *Skewb) GetURBCornerColors() [3]string

func (*Skewb) GetUpCenterColor

func (s *Skewb) GetUpCenterColor() string

func (*Skewb) OneLayerMirror

func (s *Skewb) OneLayerMirror(other Skewber, layerColor string) bool

type WCAMovesApplier

type WCAMovesApplier interface {
	ApplyWCAMoves(wcaMoves string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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