fillomino

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 18 Imported by: 0

README

Fillomino

Grow orthogonally connected regions until each region contains exactly the number written in its cells.

Fillomino gameplay

How to Play

Each number belongs to a region whose area must match that number. Grow and merge regions until every filled cell belongs to a valid orthogonally connected group.

  1. Every region must be orthogonally connected.
  2. A region's area must equal the number written in its cells.
  3. Regions with the same number may not touch orthogonally.
  4. Given cells are fixed and cannot be changed.

Controls

Key Action
Arrow keys / WASD / hjkl Move cursor
Mouse left-click Focus a cell
1-9 Place number
Backspace / Delete Clear cell
Ctrl+R Reset puzzle
Ctrl+H Toggle full help
Escape Return to main menu

Modes

Mode Size Notes
Mini 5x5 5x5 Fast intro board
Easy 6x6 6x6 Gentle deduction
Medium 8x8 8x8 Balanced board
Hard 10x10 10x10 Longer chains
Expert 12x12 12x12 Broad region planning

Quick Start

puzzletea new fillomino
puzzletea new fillomino "Medium 8x8"
puzzletea new fillomino "Hard 10x10" --with-seed sample-seed

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKeyMap = KeyMap{
	CursorKeyMap: game.DefaultCursorKeyMap,
	Clear: key.NewBinding(
		key.WithKeys("backspace", "delete"),
		key.WithHelp("bkspc", "Clear"),
	),
}
View Source
var Definition = puzzle.NewDefinition(puzzle.DefinitionSpec{
	Name:         "Fillomino",
	Description:  "Grow the numbered regions to their exact sizes.",
	Aliases:      []string{"polyomino", "regions"},
	Modes:        ModeDefinitions,
	DailyModeIDs: puzzle.SelectModeIDsByIndex(ModeDefinitions, 1, 2, 3),
})
View Source
var HelpContent string
View Source
var ModeDefinitions = gameentry.BuildModeDefs(Modes)
View Source
var Modes = []game.Mode{
	NewMode("Mini 5x5", "Small board with generous clues.", 5, 5, 0.70),
	NewMode("Easy 6x6", "Compact board with simple regions.", 6, 6, 0.66),
	NewMode("Medium 8x8", "Balanced deduction and region growth.", 8, 7, 0.60),
	NewMode("Hard 10x10", "Larger board with denser interactions.", 10, 8, 0.56),
	NewMode("Expert 12x12", "Wide board with long deduction chains.", 12, 9, 0.52),
}
View Source
var PDFPrintAdapter = printAdapter{}

Functions

func New

func New(mode Mode, puzzle Puzzle) (game.Gamer, error)

Types

type KeyMap

type KeyMap struct {
	game.CursorKeyMap
	Clear key.Binding
}

type Mode

type Mode struct {
	game.BaseMode
	Size       int
	MaxRegion  int
	GivenRatio float64
}

func NewMode

func NewMode(title, description string, size, maxRegion int, givenRatio float64) Mode

func (Mode) Spawn

func (m Mode) Spawn() (game.Gamer, error)

func (Mode) SpawnSeeded

func (m Mode) SpawnSeeded(rng *rand.Rand) (game.Gamer, error)

type Model

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

func ImportModel

func ImportModel(data []byte) (*Model, error)

func (Model) GetDebugInfo

func (m Model) GetDebugInfo() string

func (Model) GetFullHelp

func (m Model) GetFullHelp() [][]key.Binding

func (Model) GetSave

func (m Model) GetSave() ([]byte, error)

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) IsSolved

func (m Model) IsSolved() bool

func (Model) Reset

func (m Model) Reset() game.Gamer

func (Model) SetTitle

func (m Model) SetTitle(t string) game.Gamer

func (Model) Update

func (m Model) Update(msg tea.Msg) (game.Gamer, tea.Cmd)

func (Model) View

func (m Model) View() string

type Puzzle

type Puzzle struct {
	Width    int
	Height   int
	Givens   grid
	Solution grid
}

func GeneratePuzzle

func GeneratePuzzle(width, height, maxRegion int, givenRatio float64) (Puzzle, error)

func GeneratePuzzleSeeded

func GeneratePuzzleSeeded(width, height, maxRegion int, givenRatio float64, rng *rand.Rand) (Puzzle, error)

type Save

type Save struct {
	Width        int    `json:"width"`
	Height       int    `json:"height"`
	State        string `json:"state"`
	Provided     string `json:"provided"`
	ModeTitle    string `json:"mode_title"`
	MaxCellValue int    `json:"max_cell_value,omitempty"`
}

Jump to

Keyboard shortcuts

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