quiz

package
v0.0.0-...-d1c2ce7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Printer

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

func NewPrinter

func NewPrinter(writer io.Writer) *Printer

func (*Printer) PrintQuestion

func (p *Printer) PrintQuestion(question config.Question) error

func (*Printer) PrintResult

func (p *Printer) PrintResult(result Result) error

type Result

type Result struct {
	Correct        int
	Total          int
	WrongQuestions []answeredQuestion
}

type Runner

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

func NewRunner

func NewRunner(questions []config.Question) *Runner

func (*Runner) GenerateQuestion

func (r *Runner) GenerateQuestion() config.Question

func (*Runner) MarkAnswer

func (r *Runner) MarkAnswer(answered []int)

func (*Runner) Next

func (r *Runner) Next() bool

func (*Runner) Result

func (r *Runner) Result() Result

Jump to

Keyboard shortcuts

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