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], }
View Source
var DefaultKeyMap = KeyMap{ CursorKeyMap: game.DefaultCursorKeyMap, Toggle: key.NewBinding( key.WithKeys("enter", "space"), key.WithHelp("enter/space", "Toggle"), ), }
View Source
var Definition = game.Definition{ Name: "Lights Out", Description: "Turn off all the lights.", Aliases: []string{"lights"}, Modes: Modes, DailyModes: DailyModes, Help: HelpContent, Import: func(data []byte) (game.Gamer, error) { return ImportModel(data) }, }
View Source
var HelpContent string
Functions ¶
Types ¶
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.
