1package sudokurgb23import (4 _ "embed"5 "math/rand/v2"67 "github.com/FelineStateMachine/puzzletea/game"8 "github.com/FelineStateMachine/puzzletea/gameentry"9 "github.com/FelineStateMachine/puzzletea/puzzle"10)1112//go:embed help.md13var HelpContent string1415type SudokuRGBMode struct {16 game.BaseMode17 ProvidedCount int18}1920var (21 _ game.Mode = SudokuRGBMode{}22 _ game.Spawner = SudokuRGBMode{}23 _ game.SeededSpawner = SudokuRGBMode{}24)2526func NewMode(title, description string, providedCount int) SudokuRGBMode {27 return SudokuRGBMode{28 BaseMode: game.NewBaseMode(title, description),29 ProvidedCount: providedCount,30 }31}3233func (s SudokuRGBMode) Spawn() (game.Gamer, error) {34 return New(s, GenerateProvidedCells(s))35}3637func (s SudokuRGBMode) SpawnSeeded(rng *rand.Rand) (game.Gamer, error) {38 return New(s, GenerateProvidedCellsSeeded(s, rng))39}4041var Modes = []game.Mode{42 NewMode("Beginner", "60 clues. Gentle intro to RGB quota logic.", 60),43 NewMode("Easy", "54 clues. Early rows and boxes resolve quickly.", 54),44 NewMode("Medium", "48 clues. Mixed row, column, and box pressure.", 48),45 NewMode("Hard", "42 clues. More ambiguous houses and cross-checking.", 42),46 NewMode("Expert", "36 clues. Sparse givens require deeper scanning.", 36),47 NewMode("Diabolical", "30 clues. Tightest clue budget in the launch set.", 30),48}4950var ModeDefinitions = gameentry.BuildModeDefs(Modes)5152var Definition = puzzle.NewDefinition(puzzle.DefinitionSpec{53 Name: "Sudoku RGB",54 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.",55 Aliases: []string{"rgb sudoku", "ripeto", "sudoku ripeto"},56 Modes: ModeDefinitions,57 DailyModeIDs: puzzle.SelectModeIDsByIndex(ModeDefinitions, 1, 2),58})5960var Entry = gameentry.NewEntry(gameentry.EntrySpec{61 Definition: Definition,62 Help: HelpContent,63 Import: game.AdaptImport(ImportModel),64 Modes: Modes,65 Print: PDFPrintAdapter,66})