Documentation
¶
Index ¶
- Constants
- Variables
- func AiMoveCmd(board *core.Board, depth int, color core.Color) tea.Cmd
- func ClearSelection(m model) model
- func GetBoardSize(board string) (int, int)
- func GetSquare(cursor int) string
- func MoveCursor(cursor int, direction string) int
- func MoveCursorToCol(cursor int, col string) int
- func MoveCursorToRow(cursor int, col string) int
- func RenderBoard(board *core.Board, cursorSq int, selectedMoves []core.Move) string
- func RenderStatusPanel(m model) string
- func RunDisplay(mode GameMode)
- func SelectSquareForLegalMoves(m model) (model, bool)
- func SwitchTurn(m model) model
- type AiMove
- type GameMode
Constants ¶
View Source
const ( PlayerVSPlayer = iota PlayerVSAI AIVSAI )
Variables ¶
View Source
var ( WhitePieceStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("#FFFFFF")). Bold(true) BlackPieceStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("#000000")). Bold(true) NeutralStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("#a19e9e")). Bold(true) HighlightedStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("#1eff00")). Bold(true) LegalMoveStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("#a19e9e")) BoardBorderStyle = lipgloss.NewStyle(). BorderForeground(lipgloss.Color("#a19e9e")). Border(lipgloss.ASCIIBorder()) StatusPanelStyle = lipgloss.NewStyle(). Border(lipgloss.ASCIIBorder()). BorderForeground(lipgloss.Color("#a19e9e")). Padding(1, 2). Width(20). Align(lipgloss.Center). AlignVertical(lipgloss.Center) )
Functions ¶
func ClearSelection ¶
func ClearSelection(m model) model
func GetBoardSize ¶
func MoveCursorToCol ¶
func MoveCursorToRow ¶
func RenderBoard ¶
func RenderStatusPanel ¶
func RenderStatusPanel(m model) string
func RunDisplay ¶
func RunDisplay(mode GameMode)
func SelectSquareForLegalMoves ¶
func SelectSquareForLegalMoves(m model) (model, bool)
Types ¶
Click to show internal directories.
Click to hide internal directories.