usecase

package
Version: v0.0.1-0...-d0d4b74 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader interface {
	Init() error
	Load(set string) (*entity.CardStack, error)
	Save(cards *entity.CardStack) error
}

type Manager

type Manager interface {
	AutoSelect(cs *entity.CardStack, bin entity.BinType) []entity.Card
	Analyse(card *entity.Card)
	Move(card *entity.Card)
}

type Scorer

type Scorer interface {
	// Score compares an answer and the correct answer and calculates the score.
	Score(value, answer string) int
	// BadScore grades a score as very bad (-1), bad (0), good (1).
	BadScore(score int) int
}

type Teacher

type Teacher interface {
	Train(entity.BinType, bool)
	Ask(card *entity.Card, withSecondChance bool) int
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL