Documentation
¶
Index ¶
- Variables
- func New(mode Mode, puzzle Puzzle) (game.Gamer, error)
- type Cage
- type Cell
- type KeyMap
- type Mode
- type Model
- func (m Model) GetDebugInfo() string
- func (m Model) GetFullHelp() [][]key.Binding
- func (m Model) GetSave() ([]byte, error)
- func (m Model) Init() tea.Cmd
- func (m Model) IsSolved() bool
- func (m Model) Reset() game.Gamer
- func (m Model) SetTitle(t string) game.Gamer
- func (m Model) Update(msg tea.Msg) (game.Gamer, tea.Cmd)
- func (m Model) View() string
- type Puzzle
- type Save
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKeyMap = KeyMap{ CursorKeyMap: game.DefaultCursorKeyMap, FillValue: key.NewBinding( key.WithKeys("1", "2", "3", "4", "5", "6", "7", "8", "9"), key.WithHelp("1-9", "Fill"), ), Clear: key.NewBinding( key.WithKeys("backspace", "delete"), key.WithHelp("bkspc", "Clear"), ), }
View Source
var Definition = puzzle.NewDefinition(puzzle.DefinitionSpec{ Name: "Ripple Effect", Description: "Fill the cages with sequential numbers without violating ripple distance.", Aliases: []string{"ripple"}, Modes: ModeDefinitions, DailyModeIDs: puzzle.SelectModeIDsByIndex(ModeDefinitions, 1, 2, 3), })
View Source
var Entry = gameentry.NewEntry(gameentry.EntrySpec{ Definition: Definition, Help: HelpContent, Import: game.AdaptImport(ImportModel), Modes: Modes, Print: PDFPrintAdapter, })
View Source
var HelpContent string
View Source
var ModeDefinitions = gameentry.BuildModeDefs(Modes)
View Source
var Modes = []game.Mode{ NewModeWithProfile( "Mini 5x5", "Compact cages with extra anchors for quick local reads.", 5, 3, 0.69, generationProfile{ cageWeights: []int{0, 5, 6, 3}, frontierSamples: 3, shapeBias: shapeBiasCompact, minGivensByCage: []int{0, 1, 1, 2}, }, ), NewModeWithProfile( "Easy 6x6", "Gentle spacing logic with compact cages and steady clues.", 6, 3, 0.64, generationProfile{ cageWeights: []int{0, 3, 5, 4}, frontierSamples: 3, shapeBias: shapeBiasCompact, minGivensByCage: []int{0, 1, 1, 2}, }, ), NewModeWithProfile( "Medium 7x7", "Mixed cage shapes with a balanced clue spread.", 7, 4, 0.59, generationProfile{ cageWeights: []int{0, 2, 4, 5, 3}, frontierSamples: 2, shapeBias: shapeBiasNeutral, minGivensByCage: []int{0, 1, 1, 1, 1}, }, ), NewModeWithProfile( "Hard 8x8", "Longer cages and lighter anchors create broader ripple scans.", 8, 4, 0.55, generationProfile{ cageWeights: []int{0, 1, 2, 4, 5}, frontierSamples: 3, shapeBias: shapeBiasWinding, minGivensByCage: []int{0, 1, 1, 1, 1}, }, ), NewModeWithProfile( "Expert 9x9", "Sparser anchors and winding large cages push global deductions.", 9, 5, 0.51, generationProfile{ cageWeights: []int{0, 1, 1, 3, 4, 5}, frontierSamples: 4, shapeBias: shapeBiasWinding, minGivensByCage: []int{0, 1, 1, 1, 1, 1}, }, ), }
View Source
var PDFPrintAdapter = printAdapter{}
Functions ¶
Types ¶
type Mode ¶
type Mode struct {
game.BaseMode
Size int
MaxCage int
GivenRatio float64
// contains filtered or unexported fields
}
func NewModeWithProfile ¶ added in v1.8.0
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func ImportModel ¶
func (Model) GetDebugInfo ¶
func (Model) GetFullHelp ¶
type Puzzle ¶
func GeneratePuzzle ¶
Click to show internal directories.
Click to hide internal directories.
