Documentation ¶
Index ¶
- func ParseSolution(puzzle, solution string) string
- type Possibles
- type Solver
- func (s *Solver) Get(row, col int) (rune, rune)
- func (s *Solver) GetSolution(row, col int) rune
- func (s *Solver) Print()
- func (s *Solver) Serialize() string
- func (s *Solver) Set(row, col int, l, c rune)
- func (s *Solver) Size() int
- func (s *Solver) Solve() bool
- func (s *Solver) Solved() bool
- func (s *Solver) Tiles() []board.Tile
- func (s *Solver) TilesInCol(row, col int, matchColor rune) map[rune]int
- func (s *Solver) TilesInRow(row, col int, matchColor rune) map[rune]int
- func (s *Solver) WhiteTiles() map[rune]int
- func (s *Solver) YellowDupes() map[rune]int
- func (s *Solver) YellowEvenCol(i int) []rune
- func (s *Solver) YellowEvenRow(i int) []rune
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseSolution ¶
ParseSolution returns the serialization of the game given a puzzle and a solution
Types ¶
type Solver ¶
type Solver struct {
// contains filtered or unexported fields
}
func (*Solver) GetSolution ¶
GetSolution returns the solution letter and color at row, col
func (*Solver) Print ¶
func (s *Solver) Print()
Print prints a representation of the solver state to the console
func (*Solver) TilesInCol ¶
TilesInCol returns the set of letters of a given color (and their count) adjacent to the given coord
func (*Solver) TilesInRow ¶
TilesInRow returns the set of letters of a given color (and their count) adjacent to the given coord
func (*Solver) WhiteTiles ¶
WhiteTiles returns the letters on all of the white tiles
func (*Solver) YellowDupes ¶
YellowDupes returns any yellow tile letters that are duplicates of each other
func (*Solver) YellowEvenCol ¶
YellowEvenCol returns the letters on yellow tiles in non-intersections for the given col
func (*Solver) YellowEvenRow ¶
YellowEvenRow returns the letters on yellow tiles in non-intersections for the given row