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
}
