Documentation
¶
Overview ¶
Package lightsout implements the lights out toggle puzzle game.
Index ¶
- Variables
- func Generate(w, h int) [][]bool
- func GenerateSeeded(w, h int, rng *rand.Rand) [][]bool
- func IsSolved(grid [][]bool) bool
- func Toggle(grid [][]bool, x, y int)
- 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 Save
Constants ¶
This section is empty.
Variables ¶
View Source
var DailyModes = []list.Item{ Modes[1], Modes[2], }
DailyModes is the subset of Modes eligible for daily puzzle rotation.
View Source
var DefaultKeyMap = KeyMap{ CursorKeyMap: game.DefaultCursorKeyMap, Toggle: key.NewBinding( key.WithKeys("enter", "space"), key.WithHelp("enter/space", "Toggle"), ), }
View Source
var HelpContent string
View Source
var Modes = []list.Item{ NewMode("Easy", "3x3 grid", 3, 3), NewMode("Medium", "5x5 grid", 5, 5), NewMode("Hard", "7x7 grid", 7, 7), NewMode("Extreme", "9x9 grid", 9, 9), }
Modes defines the available difficulty levels.
Functions ¶
Types ¶
type Mode ¶
Mode represents a specific difficulty configuration for Lights Out.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func ImportModel ¶
func (Model) GetDebugInfo ¶
func (Model) GetFullHelp ¶
Click to show internal directories.
Click to hide internal directories.
