soln

package
v0.0.0-...-11d313d Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ChannelLength = 32
View Source
const G_SolnDir = ".solns"
View Source
const SolnLength = 32

Variables

This section is empty.

Functions

func CheckBoundsInit

func CheckBoundsInit() (er error)

func CheckByteOverflowSum

func CheckByteOverflowSum(a, b byte) bool

func CheckHash

func CheckHash(tos TickOrStop, hash []byte) (tf bool)

func CheckSoln

func CheckSoln(channelID ChannelID, solnAttempt [32]byte, tos TickOrStop) (tf bool)

func GenerateAndStoreChanSolns

func GenerateAndStoreChanSolns(numberOfChans, solsPerChan int) (er error)

func GenerateAndStoreSolns

func GenerateAndStoreSolns(channelID ChannelID, tos TickOrStop,
	numberToGen int) (er error)

func IncrementBArrByOne

func IncrementBArrByOne(b []byte) []byte

func InitBounds

func InitBounds() (er error)

func StoreSolns

func StoreSolns(channelID ChannelID, solns []Soln, tos TickOrStop) (er error)

Types

type Bound

type Bound struct {
	sync.RWMutex
	B []byte
}

type ChannelID

type ChannelID [ChannelLength]byte

func B2ChannelID

func B2ChannelID(b []byte) ChannelID

type Soln

type Soln [SolnLength]byte

func B2Soln

func B2Soln(b []byte) Soln

func GenerateSolns

func GenerateSolns(channelID ChannelID, tos TickOrStop,
	numberToGen int) (ret []Soln, er error)

func IncrementSolnByOne

func IncrementSolnByOne(b Soln) (s Soln)

func NewBaseGuess

func NewBaseGuess() (b Soln, er error)

Jump to

Keyboard shortcuts

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