Documentation ¶
Index ¶
- Constants
- func IsLower(c string) bool
- func IsUpper(c string) bool
- type Board
- func (b *Board) AreDifferentColor(firstX, firstY, secondX, secondY int) bool
- func (b *Board) Clone() Board
- func (b *Board) DoesOpponentDiagonalBeatField(row, column int) bool
- func (b *Board) DoesOpponentHorseBeatField(row, column int) bool
- func (b *Board) DoesOpponentKingBeatField(row, column int) bool
- func (b *Board) DoesOpponentLineBeatField(row, column int) bool
- func (b *Board) DoesOpponentPawnBeatField(row, column int) bool
- func (b *Board) FillEmptyMatrix()
- func (b *Board) GetAllHorseFields(row, column int) *list.List
- func (b *Board) GetAllKingFields(row, column int) *list.List
- func (b *Board) GetAllPossibleMoves() *list.List
- func (b *Board) GetBishopPossibleMoves(row int, column int) *list.List
- func (b *Board) GetBlackIndexes() *list.List
- func (b *Board) GetBlackPawnPossibleMoves(row int, column int) *list.List
- func (b *Board) GetChildBoards() *list.List
- func (b *Board) GetCurrentPossibleMoves(x int, y int) *list.List
- func (b *Board) GetDiagonalDownLeftPossibleMoves(row, column int) *list.List
- func (b *Board) GetDiagonalDownRightPossibleMoves(row, column int) *list.List
- func (b *Board) GetDiagonalUpLeftPossibleMoves(row, column int) *list.List
- func (b *Board) GetDiagonalUpRightPossibleMoves(row, column int) *list.List
- func (b *Board) GetDownPossibleMoves(row, column int) *list.List
- func (b *Board) GetFillValue(c string, isWhite bool) string
- func (b *Board) GetHorsePossibleMoves(row int, column int) *list.List
- func (b *Board) GetKingPossibleMoves(row int, column int) *list.List
- func (b *Board) GetLeftPossibleMoves(row, column int) *list.List
- func (b *Board) GetPawnPossibleMoves(row int, column int) *list.List
- func (b *Board) GetPieceValue(c string) int
- func (b *Board) GetPrintValue(c string) string
- func (b *Board) GetQueenPossibleMoves(row int, column int) *list.List
- func (b *Board) GetRightPossibleMoves(row, column int) *list.List
- func (b *Board) GetRockPossibleMoves(row int, column int) *list.List
- func (b *Board) GetUpPossibleMoves(row, column int) *list.List
- func (b *Board) GetValue() int
- func (b *Board) GetWhiteIndexes() *list.List
- func (b *Board) GetWhitePawnPossibleMoves(row int, column int) *list.List
- func (b *Board) IsFinished() bool
- func (b *Board) IsInBoard(row, column int) bool
- func (b *Board) IsOpponentBeatField(row, column int) bool
- func (b *Board) New(areWeWithWhite bool)
- func (b *Board) PerformMove(move Move)
- func (b *Board) PrintMatrix()
- type Game
- func (g *Game) FindMax(node Node, counter int) TupleBoard
- func (g *Game) FindMin(node Node, counter int) TupleBoard
- func (g *Game) GetAtIndex(list *list.List, index int) TupleBoardValue
- func (g *Game) Max(list *list.List) int
- func (g *Game) Min(list *list.List) int
- func (g *Game) New(currentNode Node, maxCount int)
- func (g *Game) PlayGameWithAI()
- func (g *Game) PlayerPlay()
- type Move
- type Node
- type Tuple
- type TupleBoard
- type TupleBoardValue
Constants ¶
View Source
const ( N = 8 Empty = "☐" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Board ¶
type Board struct { Matrix [8][8]string // contains filtered or unexported fields }
func (*Board) AreDifferentColor ¶
func (*Board) DoesOpponentDiagonalBeatField ¶
func (*Board) DoesOpponentHorseBeatField ¶
func (*Board) DoesOpponentKingBeatField ¶
func (*Board) DoesOpponentLineBeatField ¶
func (*Board) DoesOpponentPawnBeatField ¶
func (*Board) FillEmptyMatrix ¶
func (b *Board) FillEmptyMatrix()
func (*Board) GetAllPossibleMoves ¶
func (*Board) GetBishopPossibleMoves ¶
func (*Board) GetBlackIndexes ¶
func (*Board) GetBlackPawnPossibleMoves ¶
func (*Board) GetChildBoards ¶
func (*Board) GetCurrentPossibleMoves ¶
func (*Board) GetDiagonalDownLeftPossibleMoves ¶
func (*Board) GetDiagonalDownRightPossibleMoves ¶
func (*Board) GetDiagonalUpLeftPossibleMoves ¶
func (*Board) GetDiagonalUpRightPossibleMoves ¶
func (*Board) GetDownPossibleMoves ¶
func (*Board) GetHorsePossibleMoves ¶
func (*Board) GetKingPossibleMoves ¶
func (*Board) GetLeftPossibleMoves ¶
func (*Board) GetPawnPossibleMoves ¶
func (*Board) GetPieceValue ¶
func (*Board) GetPrintValue ¶
func (*Board) GetQueenPossibleMoves ¶
func (*Board) GetRightPossibleMoves ¶
func (*Board) GetRockPossibleMoves ¶
func (*Board) GetWhiteIndexes ¶
func (*Board) GetWhitePawnPossibleMoves ¶
func (*Board) IsFinished ¶
func (*Board) IsOpponentBeatField ¶
func (*Board) PerformMove ¶
func (*Board) PrintMatrix ¶
func (b *Board) PrintMatrix()
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
func (*Game) GetAtIndex ¶
func (g *Game) GetAtIndex(list *list.List, index int) TupleBoardValue
func (*Game) PlayGameWithAI ¶
func (g *Game) PlayGameWithAI()
func (*Game) PlayerPlay ¶
func (g *Game) PlayerPlay()
type TupleBoard ¶
type TupleBoard struct {
// contains filtered or unexported fields
}
type TupleBoardValue ¶
type TupleBoardValue struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.