Documentation ¶
Index ¶
- Constants
- type Zobrist
- func (z *Zobrist) AddMove(key uint64, m *tinymove.SmallMove, moveRack *tilemapping.Rack, ...) uint64
- func (z *Zobrist) BoardDim() int
- func (z *Zobrist) Dump(w io.Writer)
- func (z *Zobrist) Hash(squares tilemapping.MachineWord, ourRack, theirRack *tilemapping.Rack, ...) uint64
- func (z *Zobrist) Initialize(boardDim int)
Constants ¶
View Source
const MaxLetters = 35
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Zobrist ¶
type Zobrist struct { TheirTurn uint64 PosTable [][]uint64 OurRackTable [][]uint64 TheirRackTable [][]uint64 ScorelessTurns [3]uint64 // contains filtered or unexported fields }
generate a zobrist hash for a crossword game position. https://en.wikipedia.org/wiki/Zobrist_hashing
func (*Zobrist) AddMove ¶
func (z *Zobrist) AddMove(key uint64, m *tinymove.SmallMove, moveRack *tilemapping.Rack, moveTiles *[board.MaxBoardDim]tilemapping.MachineLetter, wasOurMove bool, ScorelessTurns, lastScorelessTurns int) uint64
func (*Zobrist) Hash ¶
func (z *Zobrist) Hash(squares tilemapping.MachineWord, ourRack, theirRack *tilemapping.Rack, theirTurn bool, scorelessTurns int) uint64
func (*Zobrist) Initialize ¶
Click to show internal directories.
Click to hide internal directories.