Versions in this module Expand all Collapse all v1 v1.1.0 Jul 11, 2026 Changes in this version + type GenerateConfig struct + Capacity int + Colors int + Difficulty string + Empty int + Seed int64 type Level + func Generate(cfg GenerateConfig) (*Level, error) v1.0.0 Jul 11, 2026 Changes in this version + const SolveStateCap + func PrintBoard(s *Save) + func WriteSave(path string, s *Save) error + type Level struct + Capacity int + Difficulty string + ID int + Tubes []Tube + func FindLevel(lf *LevelsFile, id int) (*Level, error) + type LevelsFile struct + Levels []Level + func DefaultLevels() (*LevelsFile, error) + func LoadLevels(path string) (*LevelsFile, error) + func LoadLevelsOrDefault(path string) (*LevelsFile, error) + type Move struct + From int + To int + func ParseMoves(s string) ([]Move, error) + type Save struct + Capacity int + History []Move + LevelID int + LevelsPath string + Moves int + Solved bool + Stuck bool + Tubes []Tube + func LoadSave(path string) (*Save, error) + func NewSave(l *Level, levelsPath string) *Save + func (s *Save) ApplyMove(from, to int) error + func (s *Save) Undo() error + type SolveResult struct + MinMoves int + Path []Move + Solvable bool + Unknown bool + func Solve(l *Level) SolveResult + type Tube []string