Documentation ¶
Index ¶
- Constants
- Variables
- type Analysis
- type Color
- type Config
- type Kind
- type Move
- type MoveType
- type Piece
- type Position
- func (p *Position) AllMoves(moves []Move) []Move
- func (p *Position) Analysis() *Analysis
- func (p *Position) At(x, y int) Square
- func (p *Position) BlackStones() int
- func (p *Position) Clone() *Position
- func (p *Position) Config() Config
- func (p *Position) Equal(rhs *Position) bool
- func (p *Position) GameOver() (over bool, winner Color)
- func (p *Position) Hash() uint64
- func (p *Position) Move(m Move) (*Position, error)
- func (p *Position) MoveNumber() int
- func (p *Position) MovePreallocated(m Move, next *Position) (*Position, error)
- func (p *Position) Size() int
- func (p *Position) ToMove() Color
- func (p *Position) Top(x, y int) Piece
- func (p *Position) WhiteStones() int
- func (p *Position) WinDetails() WinDetails
- type SlideIterator
- type Slides
- type Square
- type WinDetails
- type WinReason
Constants ¶
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Position ¶
type Position struct { White uint64 Black uint64 Standing uint64 Caps uint64 Height []uint8 Stacks []uint64 // contains filtered or unexported fields }
func FromSquares ¶
FromSquares initializes a Position with the specified squares and move number. `board` is a slice of rows, numbered from low to high, each of which is a slice of positions.
func (*Position) BlackStones ¶
func (*Position) MoveNumber ¶
func (*Position) MovePreallocated ¶
func (*Position) WhiteStones ¶
func (*Position) WinDetails ¶
func (p *Position) WinDetails() WinDetails
type SlideIterator ¶
type SlideIterator uint32
func (SlideIterator) Elem ¶
func (s SlideIterator) Elem() int
func (SlideIterator) Next ¶
func (s SlideIterator) Next() SlideIterator
func (SlideIterator) Ok ¶
func (s SlideIterator) Ok() bool
type Slides ¶
type Slides uint32
Slides is essentially a packed [8]uint4, used to represent the slide counts in a Tak move in a space-efficient way. We store the first drop count in (s&0xf), the next in (s&0xf0), and so on.
func (Slides) Iterator ¶
func (s Slides) Iterator() SlideIterator
type WinDetails ¶
Click to show internal directories.
Click to hide internal directories.