Documentation ¶
Index ¶
- Variables
- func CodeToResult(code int) []int
- func IntPow(x, y int) int
- func RandomShout() string
- func ResultToCode(result []int) int
- func WordPossible(newGuess string, prevGuessResult battleword.GuessResult) bool
- type ResultOdds
- type Store
- func (s *Store) GetDistributionExpectedRemainingAnswers(wordCount int, distribution [][]string) float64
- func (s *Store) GetPossibleWords(prevGuessResults []battleword.GuessResult) ([]string, error)
- func (s *Store) GetWordDistribution(word string, possibleAnswers []string) [][]string
- func (s *Store) GetWordDistributionCount(word string, possibleAnswers []string) []int
- func (s *Store) GuessWord(prevGuessResults []battleword.GuessResult, defaultFirst string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AllWords = append(CommonWords, HardWords...) CommonWords = []string{}/* 2309 elements not displayed */ HardWords = []string{}/* 10638 elements not displayed */ )
Functions ¶
func CodeToResult ¶
func RandomShout ¶
func RandomShout() string
func ResultToCode ¶
func WordPossible ¶
func WordPossible(newGuess string, prevGuessResult battleword.GuessResult) bool
Types ¶
type ResultOdds ¶
type Store ¶
type Store struct {
Log logrus.FieldLogger
}
func InitStore ¶
func InitStore(log logrus.FieldLogger) *Store
func (*Store) GetDistributionExpectedRemainingAnswers ¶
func (*Store) GetPossibleWords ¶
func (s *Store) GetPossibleWords(prevGuessResults []battleword.GuessResult) ([]string, error)
func (*Store) GetWordDistribution ¶
func (*Store) GetWordDistributionCount ¶
func (*Store) GuessWord ¶
func (s *Store) GuessWord(prevGuessResults []battleword.GuessResult, defaultFirst string) (string, error)
Click to show internal directories.
Click to hide internal directories.