256999b42c
- Rename module to gitea.iliadenisov.ru/developer/scrabble-solver so it can be consumed as a versioned dependency (no go.work replace / CI clone). - De-internalize wordlist and dictdawg as public packages. - Remove cmd/builddict, dictprep/, the dictionaries submodule and the dawg Makefile: the word-list parsing and DAWG build now live in the separate scrabble-dictionary repository, which publishes the DAWG set as a release artifact. - internal/dict loads the committed dawg/en_sowpods.dawg fixture for cmd/stress. - Update README/CLAUDE docs accordingly.
19 lines
661 B
Go
19 lines
661 B
Go
package scrabble
|
|
|
|
import (
|
|
"gitea.iliadenisov.ru/developer/scrabble-solver/board"
|
|
"gitea.iliadenisov.ru/developer/scrabble-solver/rack"
|
|
)
|
|
|
|
// Generator produces every legal play for a position. The DAWG generator
|
|
// (Appel-Jacobson) is the implementation; the interface keeps the self-play engine and
|
|
// the solver decoupled from the concrete type.
|
|
type Generator interface {
|
|
// GenerateMoves returns every legal play for rack r on board b in the modes'
|
|
// orientations. The result is unsorted; callers (or the Solver) rank it.
|
|
GenerateMoves(b *board.Board, r rack.Rack, mode Mode) []Move
|
|
|
|
// Name identifies the generator (e.g. "dawg").
|
|
Name() string
|
|
}
|