Documentation
¶
Index ¶
- Variables
- func New(mode NetwalkMode, puzzle Puzzle) (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 NetwalkMode
- type Puzzle
- type Save
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKeyMap = KeyMap{ CursorKeyMap: game.DefaultCursorKeyMap, Rotate: key.NewBinding( key.WithKeys("space"), key.WithHelp("space", "Rotate"), ), RotateBack: key.NewBinding( key.WithKeys("backspace", "shift+space"), key.WithHelp("bkspc", "Rotate back"), ), Lock: key.NewBinding( key.WithKeys("enter"), key.WithHelp("enter", "Toggle lock"), ), }
View Source
var Definition = puzzle.NewDefinition(puzzle.DefinitionSpec{ Name: "Netwalk", Description: "Rotate network tiles until every computer connects to the server.", Aliases: []string{"network"}, 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("Mini 5x5", "Compact 5×5 network with a denser starter tree.", 5, 0.50, miniProfile), NewMode("Easy 7x7", "7×7 board with fuller coverage and gentle local tangles.", 7, 0.57, easyProfile), NewMode("Medium 9x9", "Balanced 9×9 network with tighter clusters and more branching.", 9, 0.64, mediumProfile), NewMode("Hard 11x11", "Dense 11×11 board that packs branches into close local interactions.", 11, 0.72, hardProfile), NewMode("Expert 13x13", "Large, crowded network with heavy branching and frequent near-miss tangles.", 13, 0.78, expertProfile), }
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 NetwalkMode ¶
func NewMode ¶
func NewMode(title, desc string, size int, fillRatio float64, profile generateProfile) NetwalkMode
func (NetwalkMode) SpawnSeeded ¶
Click to show internal directories.
Click to hide internal directories.
