Documentation
¶
Index ¶
- Constants
- Variables
- func CacheLoadFunc(cfg *wglconfig.Config, key string) (interface{}, error)
- func ErrorIfIllegalPlay(board *ipc.GameBoard, row, col int, vertical bool, ...) error
- func FormedWords(board *ipc.GameBoard, row, col int, vertical bool, ...) ([]tilemapping.MachineWord, error)
- func GetLetter(board *ipc.GameBoard, row, col int) tilemapping.MachineLetter
- func HasLetter(board *ipc.GameBoard, row, col int) bool
- func NewBoard(bl *BoardLayout) *ipc.GameBoard
- func PlayMove(board *ipc.GameBoard, layoutName string, dist *tilemapping.LetterDistribution, ...) (int32, error)
- func PosExists(board *ipc.GameBoard, row, col int) bool
- func ToFEN(board *ipc.GameBoard, dist *tilemapping.LetterDistribution) string
- func ToUserVisibleString(board *ipc.GameBoard, layoutName string, rm *tilemapping.TileMapping) (string, error)
- func UnplaceMoveTiles(board *ipc.GameBoard, mls []tilemapping.MachineLetter, row, col int, ...) error
- type BoardLayout
- type BonusSquare
Constants ¶
View Source
const ( CrosswordGameLayout = "CrosswordGame" SuperCrosswordGameLayout = "SuperCrosswordGame" )
View Source
const VsMatt = `` /* 807-byte string literal not displayed */
VsMatt was a game I played against Matt Graham, 2018 Lake George tourney
View Source
const VsOxy = `` /* 777-byte string literal not displayed */
Variables ¶
View Source
var ( // CrosswordGameBoard is a board for a fun Crossword Game, featuring lots // of wingos and blonks. CrosswordGameBoard []string // SuperCrosswordGameBoard is a board for a bigger Crossword game, featuring // even more wingos and blonks. SuperCrosswordGameBoard []string )
View Source
var CacheKeyPrefix = "boardlayout:"
View Source
var (
ColorSupport = os.Getenv("LIWORDS_DISABLE_COLOR") != "on"
)
Functions ¶
func CacheLoadFunc ¶
CacheLoadFunc is the function that loads an object into the global cache.
func ErrorIfIllegalPlay ¶
func ErrorIfIllegalPlay(board *ipc.GameBoard, row, col int, vertical bool, word []tilemapping.MachineLetter) error
func FormedWords ¶
func FormedWords(board *ipc.GameBoard, row, col int, vertical bool, mls []tilemapping.MachineLetter) ([]tilemapping.MachineWord, error)
FormedWords returns an array of all machine words formed by this move. The move is assumed to be of type Play
func GetLetter ¶
func GetLetter(board *ipc.GameBoard, row, col int) tilemapping.MachineLetter
func NewBoard ¶
func NewBoard(bl *BoardLayout) *ipc.GameBoard
func PlayMove ¶
func PlayMove(board *ipc.GameBoard, layoutName string, dist *tilemapping.LetterDistribution, mls []tilemapping.MachineLetter, row, col int, vertical bool) (int32, error)
PlayMove plays the move on the board and returns the score of the move.
func ToFEN ¶
func ToFEN(board *ipc.GameBoard, dist *tilemapping.LetterDistribution) string
func ToUserVisibleString ¶
func ToUserVisibleString(board *ipc.GameBoard, layoutName string, rm *tilemapping.TileMapping) (string, error)
func UnplaceMoveTiles ¶
func UnplaceMoveTiles(board *ipc.GameBoard, mls []tilemapping.MachineLetter, row, col int, vertical bool) error
UnplaceMoveTiles unplaces the tiles -- that is, removes them from the board
Types ¶
type BoardLayout ¶
func GetBoardLayout ¶
func GetBoardLayout(name string) (*BoardLayout, error)
func NamedBoardLayout ¶
func NamedBoardLayout(name string) (*BoardLayout, error)
type BonusSquare ¶
type BonusSquare byte
const ( EmptySpace BonusSquare = 0 Bonus2LS BonusSquare = 2 Bonus3LS BonusSquare = 3 Bonus4LS BonusSquare = 4 Bonus2WS BonusSquare = 12 Bonus3WS BonusSquare = 13 Bonus4WS BonusSquare = 14 )
Click to show internal directories.
Click to hide internal directories.