Documentation
¶
Index ¶
- Variables
- func AnalyzeBoard(jsonBoard []byte) ([]byte, error)
- type Analyzer
- func (an *Analyzer) Analyze(jsonBoard []byte) ([]byte, error)
- func (an *Analyzer) GenerateMoves(numPlays int)
- func (an *Analyzer) LoadGame(jsonBoard []byte) error
- func (an *Analyzer) RunTest() error
- func (an *Analyzer) SimInit() error
- func (an *Analyzer) SimSingleThread(iters int) error
- func (an *Analyzer) SimState() ([]byte, error)
- func (an *Analyzer) ToJsonMoves() ([]byte, error)
- type JsonBoard
- type JsonMove
Constants ¶
This section is empty.
Variables ¶
View Source
var SampleJson = []byte(`{
"scores": [0, 0],
"onturn": 0,
"size": 15,
"rack": "EINRSTZ",
"lexicon": "CSW19",
"board": [
"...............",
"...............",
"...............",
"...............",
"...............",
"...............",
"...............",
"...HELLO.......",
"...............",
"...............",
"...............",
"...............",
"...............",
"...............",
"..............."
]}`)
Functions ¶
func AnalyzeBoard ¶
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
func NewAnalyzer ¶
func NewDefaultAnalyzer ¶
func NewDefaultAnalyzer() *Analyzer
Create an analyzer with an empty config. This will not have any relative resource paths resolved to actual paths; the caller is responsible for precaching everything so that we never actually hit the file system.
func (*Analyzer) GenerateMoves ¶ added in v0.8.2
func (*Analyzer) SimSingleThread ¶ added in v0.8.2
func (*Analyzer) ToJsonMoves ¶ added in v0.8.2
Click to show internal directories.
Click to hide internal directories.