schwordler

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2022 License: MIT Imports: 4 Imported by: 0

README

schwordler

will do wordles for you. built to compete on the battleword engine.

Documentation

Index

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 CodeToResult(code int) []int

func IntPow

func IntPow(x, y int) int

IntPower return x^y but as ints for speed

func RandomShout

func RandomShout() string

func ResultToCode

func ResultToCode(result []int) int

func WordPossible

func WordPossible(newGuess string, prevGuessResult battleword.GuessResult) bool

Types

type ResultOdds

type ResultOdds struct {
	Result []int
	Words  []string
}

type Store

type Store struct {
	Log logrus.FieldLogger
}

func InitStore

func InitStore(log logrus.FieldLogger) *Store

func (*Store) GetDistributionExpectedRemainingAnswers

func (s *Store) GetDistributionExpectedRemainingAnswers(wordCount int, distribution [][]string) float64

func (*Store) GetPossibleWords

func (s *Store) GetPossibleWords(prevGuessResults []battleword.GuessResult) ([]string, error)

func (*Store) GetWordDistribution

func (s *Store) GetWordDistribution(word string, possibleAnswers []string) [][]string

func (*Store) GetWordDistributionCount

func (s *Store) GetWordDistributionCount(word string, possibleAnswers []string) []int

func (*Store) GuessWord

func (s *Store) GuessWord(prevGuessResults []battleword.GuessResult, defaultFirst string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL