bot

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BotGame

func BotGame(answer string, firstGuess string, filter FilterMethod) game.Results

answer may be empty, in which case a real answer will be generated firstGuess may be empty, in which case the first guess will be random

func FilterGuesses

func FilterGuesses(validGuesses []string, gray []GameInformation, yellow []GameInformation, green []GameInformation) []string

If we know where a green is, all valid guesses must have that letter in that spot. Grays are a bit trickier because of double letters. If we know where a yellow is, valid guesses must have that letter in the guess, but it can't be in the same place as last time.

func FilterNone

func FilterNone(validGuesses []string, gray []GameInformation, yellow []GameInformation, green []GameInformation) []string

Strategy where you don't filter any, so every guess becomes random

Types

type FilterMethod

type FilterMethod = func(validGuesses []string, gray []GameInformation, yellow []GameInformation, green []GameInformation) []string

type GameInformation

type GameInformation struct {
	Letter rune
	Index  int
}

Jump to

Keyboard shortcuts

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