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.
15 lines
451 B
Go
15 lines
451 B
Go
package scrabble
|
|
|
|
import (
|
|
"gitea.iliadenisov.ru/developer/scrabble-solver/board"
|
|
"gitea.iliadenisov.ru/developer/scrabble-solver/internal/encoding"
|
|
)
|
|
|
|
// Apply places a move's newly-placed tiles on the board. The move must be legal for the
|
|
// board (as produced by a generator, or validated); Apply does not re-check it.
|
|
func Apply(b *board.Board, m Move) {
|
|
for _, t := range m.Tiles {
|
|
b.Set(t.Row, t.Col, encoding.Cell(t.Letter, t.Blank))
|
|
}
|
|
}
|