dinner

package
v0.0.0-...-07010e4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Permutations

func Permutations(sl []string) <-chan []string

Types

type Arrangement

type Arrangement struct {
	// contains filtered or unexported fields
}

func NewArrangement

func NewArrangement(rules Rules) *Arrangement

func (*Arrangement) FindBest

func (a *Arrangement) FindBest()

func (*Arrangement) PairScore

func (a *Arrangement) PairScore(who, next string) int

func (*Arrangement) Positions

func (a *Arrangement) Positions() []string

func (*Arrangement) Score

func (a *Arrangement) Score() int

type Rule

type Rule struct {
	Who   string
	Score int
	Next  string
}

func ParseRule

func ParseRule(s string) (Rule, error)

func (Rule) Pairing

func (r Rule) Pairing() string

func (Rule) String

func (r Rule) String() string

type Rules

type Rules []Rule

Jump to

Keyboard shortcuts

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