bond

package
v0.0.0-...-35e9c0b Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Plus   Operator = "plus"
	Minus           = "minus"
	Times           = "times"
	Divide          = "divide"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event string
const (
	CORRECT   Event = "correct"
	INCORRECT Event = "incorrect"
	HINT      Event = "hint"
)

type Operator

type Operator string

type Parameters

type Parameters struct {
	Max         int
	MaxTimes    int
	ChoiceCount int
	Operators   []Operator
}

func (*Parameters) NewProblem

func (param *Parameters) NewProblem() (p Problem)

type Problem

type Problem struct {
	A, B, C int
	Op      Operator
	Cs      []int
}

func (Problem) Breakout

func (p Problem) Breakout() (a1, a2, b1, b2 int)

func (Problem) Groups

func (p Problem) Groups() [][2]int

type Score

type Score struct {
	Goal, Current, Wins int
	Celebrate           bool
}

func NewScore

func NewScore() *Score

func (*Score) Correct

func (s *Score) Correct()

func (*Score) Incorrect

func (s *Score) Incorrect()

Jump to

Keyboard shortcuts

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