cross_set

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

Variables

This section is empty.

Functions

func GenAllCrossScores

func GenAllCrossScores(b *Board, ld *tilemapping.LetterDistribution)

func GenAllCrossSets

func GenAllCrossSets(b *Board, gd gaddag.WordGraph, ld *tilemapping.LetterDistribution)

func GenCrossSet

func GenCrossSet(b *Board, row int, col int, dir board.BoardDirection,
	gaddag gaddag.WordGraph, ld *tilemapping.LetterDistribution)

GenCrossSet generates a cross-set for each individual square.

func UpdateCrossSetsForMove

func UpdateCrossSetsForMove(b *Board, m *move.Move,
	gd gaddag.WordGraph, ld *tilemapping.LetterDistribution)

Types

type Board

type Board = board.GameBoard

type CrossScoreOnlyGenerator

type CrossScoreOnlyGenerator struct {
	Dist *tilemapping.LetterDistribution
}

func (*CrossScoreOnlyGenerator) Generate

func (g *CrossScoreOnlyGenerator) Generate(b *Board, row int, col int, dir board.BoardDirection)

func (*CrossScoreOnlyGenerator) GenerateAll

func (g *CrossScoreOnlyGenerator) GenerateAll(b *Board)

func (*CrossScoreOnlyGenerator) UpdateForMove

func (g *CrossScoreOnlyGenerator) UpdateForMove(b *Board, m *move.Move)

func (*CrossScoreOnlyGenerator) UpdateForSmallMove added in v0.8.7

type CrossSet

type CrossSet = board.CrossSet

type GaddagCrossSetGenerator

type GaddagCrossSetGenerator struct {
	Dist   *tilemapping.LetterDistribution
	Gaddag gaddag.WordGraph
}

func (*GaddagCrossSetGenerator) Generate

func (g *GaddagCrossSetGenerator) Generate(b *Board, row int, col int, dir board.BoardDirection)

func (*GaddagCrossSetGenerator) GenerateAll

func (g *GaddagCrossSetGenerator) GenerateAll(b *Board)

func (*GaddagCrossSetGenerator) UpdateForMove

func (g *GaddagCrossSetGenerator) UpdateForMove(b *Board, m *move.Move)

func (*GaddagCrossSetGenerator) UpdateForSmallMove added in v0.8.7

func (g *GaddagCrossSetGenerator) UpdateForSmallMove(b *Board, m *tinymove.SmallMove, moveTiles *[board.MaxBoardDim]tilemapping.MachineLetter)

type Generator

type Generator interface {
	Generate(b *Board, row int, col int, dir board.BoardDirection)
	GenerateAll(b *Board)
	UpdateForMove(b *Board, m *move.Move)
	UpdateForSmallMove(b *Board, m *tinymove.SmallMove, moveTiles *[board.MaxBoardDim]tilemapping.MachineLetter)
}

type GenericMove added in v0.8.7

type GenericMove interface {
	PlayLength() int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL