incr

package
v0.0.0-...-76f603f Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: ISC Imports: 4 Imported by: 0

Documentation

Overview

Package incr implements a global random incremental map for characters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomQuote

func RandomQuote(char aqs.Character) string

RandomQuote returns a random quote using a global randomly-permutated increment map. This function is safe for concurrent use. The unique constraint for this function is the character's name and anime.

Types

type State

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

State provides an incremental permutation state. It is thread-safe.

func New

func New(n int) *State

func (*State) Next

func (s *State) Next() int

Next returns the next random index.

Jump to

Keyboard shortcuts

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