Documentation
¶
Index ¶
- Variables
- func GenerateProvidedCells(mode SudokuRGBMode) []cell
- func GenerateProvidedCellsSeeded(mode SudokuRGBMode, rng *rand.Rand) []cell
- func New(mode SudokuRGBMode, provided []cell) (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) IsProvidedCell() bool
- 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 SudokuRGBMode
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKeyMap = KeyMap{ CursorKeyMap: game.DefaultCursorKeyMap, FillValue: key.NewBinding( key.WithKeys("1", "2", "3"), key.WithHelp("1-3", "Fill"), ), ClearCell: key.NewBinding( key.WithKeys("backspace"), key.WithHelp("bkspc", "Clear"), ), }
View Source
var Definition = puzzle.NewDefinition(puzzle.DefinitionSpec{ Name: "Sudoku RGB", Description: "Fill the board with RGB symbols so each row, column, and 3x3 box contains {1,1,1,2,2,2,3,3,3}. [1,2,3] maps to [▲,■,●]. Inspired by Sudoku Ripeto.", Aliases: []string{"rgb sudoku", "ripeto", "sudoku ripeto"}, Modes: ModeDefinitions, DailyModeIDs: puzzle.SelectModeIDsByIndex(ModeDefinitions, 1, 2), })
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", "60 clues. Gentle intro to RGB quota logic.", 60), NewMode("Easy", "54 clues. Early rows and boxes resolve quickly.", 54), NewMode("Medium", "48 clues. Mixed row, column, and box pressure.", 48), NewMode("Hard", "42 clues. More ambiguous houses and cross-checking.", 42), NewMode("Expert", "36 clues. Sparse givens require deeper scanning.", 36), NewMode("Diabolical", "30 clues. Tightest clue budget in the launch set.", 30), }
View Source
var PDFPrintAdapter = printAdapter{}
Functions ¶
func GenerateProvidedCells ¶
func GenerateProvidedCells(mode SudokuRGBMode) []cell
func GenerateProvidedCellsSeeded ¶
func GenerateProvidedCellsSeeded(mode SudokuRGBMode, rng *rand.Rand) []cell
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func ImportModel ¶
func (Model) GetDebugInfo ¶
func (Model) GetFullHelp ¶
func (Model) IsProvidedCell ¶
type SudokuRGBMode ¶
func NewMode ¶
func NewMode(title, description string, providedCount int) SudokuRGBMode
func (SudokuRGBMode) SpawnSeeded ¶
Click to show internal directories.
Click to hide internal directories.