Documentation
¶
Overview ¶
Package takuzuplus implements the Takuzu+ puzzle game.
Index ¶
- Variables
- func New(mode TakuzuPlusMode, puzzle grid, provided [][]bool, rels relations) (game.Gamer, error)
- type KeyMap
- 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 Save
- type TakuzuPlusMode
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKeyMap = KeyMap{ CursorKeyMap: game.DefaultCursorKeyMap, PlaceZero: key.NewBinding( key.WithKeys("z", "0"), key.WithHelp("z/0", "Place ●"), ), PlaceOne: key.NewBinding( key.WithKeys("x", "1"), key.WithHelp("x/1", "Place ○"), ), Clear: key.NewBinding( key.WithKeys("backspace", "delete"), key.WithHelp("bkspc", "Clear"), ), }
View Source
var Definition = puzzle.NewDefinition(puzzle.DefinitionSpec{ Name: "Takuzu+", Description: "Fill the grid with ● and ○ using some relational clues. No 3 in a row.", Aliases: []string{"takuzu plus", "binario+", "binario plus"}, Modes: ModeDefinitions, DailyModeIDs: puzzle.SelectModeIDsByIndex(ModeDefinitions, 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{ NewMode("Beginner", "6×6 grid, relation clues ease early logic.", 6, 0.50, modeProfiles[0]), NewMode("Easy", "6×6 grid with additive = and x clues.", 6, 0.40, modeProfiles[1]), NewMode("Medium", "8×8 grid, mixed Takuzu and relation deductions.", 8, 0.40, modeProfiles[2]), NewMode("Tricky", "10×10 grid, uniqueness and relation clues interact.", 10, 0.38, modeProfiles[3]), NewMode("Hard", "10×10 grid, longer deduction chains with relation clues.", 10, 0.32, modeProfiles[4]), NewMode("Very Hard", "12×12 grid, sparse givens plus relation clues.", 12, 0.30, modeProfiles[5]), NewMode("Extreme", "14×14 grid, maximum size with additive relation clues.", 14, 0.28, modeProfiles[6]), }
View Source
var PDFPrintAdapter = printAdapter{}
Functions ¶
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func ImportModel ¶
func (Model) GetDebugInfo ¶
func (Model) GetFullHelp ¶
type TakuzuPlusMode ¶
type TakuzuPlusMode struct {
game.BaseMode
Size int
Prefilled float64
// contains filtered or unexported fields
}
func NewMode ¶
func NewMode(title, desc string, size int, prefilled float64, profile relationProfile) TakuzuPlusMode
func (TakuzuPlusMode) SpawnSeeded ¶
Click to show internal directories.
Click to hide internal directories.