Documentation ¶
Index ¶
- func Banner()
- func ClearScreen()
- func Confirm(response string) bool
- func Continue()
- func Dying() string
- func GetChar() (ascii string, keyCode int, err error)
- func GetReturn() (ascii string)
- func Meter(num, max, fmax int, l, t string, c string)
- func PromptConfirm(question string) string
- func Roll(n int, d int) int
- func StartBanner()
- type Screenbuffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearScreen ¶
func ClearScreen()
func GetReturn ¶
func GetReturn() (ascii string)
GetReturn returns a single string character after user enters newline
func PromptConfirm ¶
PromptConfirm returns a user entered string with confirmation from the user. e.g. answer := PromptConfirm("What's your name? ") fmt.Println("Your name is:", answer)
func Roll ¶
Roll is used to simulate die roll. roll n dice of d size, add the results and divide by n Roll(1, 100) will give even distribution between 1 - 100 Roll(2, 100) will push up the bell curve in the middle of the distribution. Roll(3, 100) even more so
func StartBanner ¶
func StartBanner()
Types ¶
type Screenbuffer ¶
type Screenbuffer struct {
Buffer []string
}
func (*Screenbuffer) Add ¶
func (b *Screenbuffer) Add(s string)
func (*Screenbuffer) Flush ¶
func (b *Screenbuffer) Flush()
func (Screenbuffer) Render ¶
func (b Screenbuffer) Render()
Click to show internal directories.
Click to hide internal directories.