Documentation
¶
Overview ¶
Code generated by go generate; DO NOT EDIT.
Index ¶
- Constants
- Variables
- func CommandDigits() *cli.Command
- func CommandLetterBoxed() *cli.Command
- func CommandOrder() *cli.Command
- func CommandPlay() *cli.Command
- func CommandRanks() *cli.Command
- func CommandScore() *cli.Command
- func CommandStrategies() *cli.Command
- func CommandSuggest() *cli.Command
- func CommandValidate() *cli.Command
- func CommandVersion() *cli.Command
- func CommandWordlists() *cli.Command
- func NoOp(_ string) bool
- func Score(secret string, guesses ...string) ([]string, error)
- type Alpha
- type Bigram
- type Board
- type Box
- type BoxOption
- type Candidate
- type Chain
- type Dictionary
- type Digits
- type Elimination
- type Encoder
- type FilterFunc
- type Frequency
- type Game
- type Grab
- type Graph
- type Mark
- type Marks
- type Operation
- type Operations
- type Operator
- type Option
- type Position
- type Round
- type Rt
- type Scoreboard
- type Speculate
- type Strategies
- type Strategy
- type Trie
Constants ¶
View Source
const RuntimeKey = "github.com/bzimmer/qordle#RuntimeKey"
RuntimeKey in app metadata
Variables ¶
View Source
var ErrInvalidFormat = errors.New("invalid pattern format")
View Source
var ErrInvalidLength = errors.New("secret and guess lengths do not match")
Functions ¶
func CommandDigits ¶
func CommandLetterBoxed ¶
func CommandOrder ¶
func CommandPlay ¶
func CommandRanks ¶
func CommandScore ¶
func CommandStrategies ¶
func CommandSuggest ¶
func CommandValidate ¶
func CommandVersion ¶
func CommandWordlists ¶
Types ¶
type Alpha ¶
type Alpha struct{}
Alpha orders the dictionary alphabetically
func (*Alpha) Apply ¶
func (s *Alpha) Apply(words Dictionary) Dictionary
type Bigram ¶
type Bigram struct{}
Bigram sorts the dictionary by the bigram frequency of the word
func (*Bigram) Apply ¶
func (s *Bigram) Apply(words Dictionary) Dictionary
type BoxOption ¶
type BoxOption func(*Box)
func WithConcurrent ¶
func WithMaxSolutionLength ¶
func WithMinWordLength ¶
type Candidate ¶
type Candidate struct {
Board Board `json:"board"`
Ops Operations `json:"ops"`
}
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain chains multiple strategies to sort the wordlist
func (*Chain) Apply ¶
func (s *Chain) Apply(words Dictionary) Dictionary
type Dictionary ¶
type Dictionary []string
func Filter ¶
func Filter(words Dictionary, fns ...FilterFunc) Dictionary
func Read ¶
func Read(name string) (Dictionary, error)
type Elimination ¶
type Elimination struct{}
func (*Elimination) Apply ¶
func (s *Elimination) Apply(words Dictionary) Dictionary
func (*Elimination) String ¶
func (s *Elimination) String() string
type FilterFunc ¶
FilterFunc performs a validation on the word
func Guess ¶
func Guess(guesses ...string) (FilterFunc, error)
func IsLower ¶
func IsLower() FilterFunc
func Length ¶
func Length(length int) FilterFunc
type Frequency ¶
type Frequency struct{}
Frequency sorts the wordlist by letter frequency
func (*Frequency) Apply ¶
func (s *Frequency) Apply(words Dictionary) Dictionary
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
type Operation ¶
type Operations ¶
type Operations []Operation
func (Operations) Hash ¶
func (o Operations) Hash() string
func (Operations) String ¶
func (o Operations) String() string
type Option ¶
type Option func(*Game)
Option provides a configuration mechanism for a Game
func WithDictionary ¶
func WithDictionary(dictionary Dictionary) Option
WithDictionary is the dictionary to use
func WithRounds ¶
type Position ¶
type Position struct{}
Position sorts the word list be letter position
func (*Position) Apply ¶
func (s *Position) Apply(words Dictionary) Dictionary
type Rt ¶
type Rt struct {
// Encoder encodes a struct
Encoder Encoder
// Grab for querying http endpoints
Grab Grab
// Start time of the execution
Start time.Time
// Strategies manages the available strategies
Strategies Strategies
}
Rt for access to runtime components
type Scoreboard ¶
type Speculate ¶
type Speculate struct {
// contains filtered or unexported fields
}
Speculate attempts to find a word which eliminates the most letters
func (*Speculate) Apply ¶
func (s *Speculate) Apply(words Dictionary) Dictionary
type Strategies ¶
type Strategy ¶
type Strategy interface {
String() string
Apply(Dictionary) Dictionary
}
func NewSpeculator ¶
func NewSpeculator(words Dictionary, strategy Strategy) Strategy
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
