Documentation ¶
Index ¶
- func Display(terminal Terminal) bool
- func GenerateMemoryBlock(terminal Terminal, passStruct PassStruct) ([]Block, PassStruct)
- type AttemptBox
- type Block
- type Cursor
- type InputBox
- type Line
- type MultiCoordinates
- type PassStruct
- type Password
- type SimpleBlock
- type SimpleCoordinates
- type SimpleLine
- type String
- type Terminal
- type TerminalSettings
- type TerminalStyle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateMemoryBlock ¶
func GenerateMemoryBlock(terminal Terminal, passStruct PassStruct) ([]Block, PassStruct)
Types ¶
type AttemptBox ¶
type AttemptBox struct { // The current lolumn TotalAttempts int // The current line RemainingAttempts int // The current line position Position MultiCoordinates }
func (*AttemptBox) Init ¶
func (a *AttemptBox) Init(t Terminal)
type Block ¶
type Block struct { // A block contains all the necessary content to render that block // The content of that block, consisting of multiple lines Content []Line Position MultiCoordinates }
type Cursor ¶
type InputBox ¶
type InputBox struct { // The current line position Position SimpleCoordinates // The last line length LastLength int Messages [][]string LongestMessage int }
type Line ¶
type Line struct { // Each line contains multiple sets of strings Content []String Position MultiCoordinates Length int }
type MultiCoordinates ¶
type MultiCoordinates struct { // Start SimpleCoordinates Mid SimpleCoordinates End SimpleCoordinates }
type PassStruct ¶
func GeneratePasswords ¶
func GeneratePasswords(passwordCount int) PassStruct
type SimpleBlock ¶
type SimpleBlock struct { // A simpleblock just contains a number of lines with strings Content []SimpleLine Position MultiCoordinates }
func GenerateAddressBlocks ¶
func GenerateAddressBlocks(AddressBlocks []SimpleBlock, settings TerminalSettings) []SimpleBlock
func GeneratePasswordBlock(lineCount int, lineWidth int, columnCount int, passwordCount int, passwords map[string]passStruct, passwordList []string) [][][]string {
type SimpleCoordinates ¶
type SimpleLine ¶
type SimpleLine struct { Content string Position MultiCoordinates }
type String ¶
type String struct { Content string Position MultiCoordinates Length int StringType string Attempted bool }
type Terminal ¶
type Terminal struct { // The terminal settings Settings TerminalSettings // The color styling Style TerminalStyle // The header block Header SimpleBlock // The address block AddressBlocks []SimpleBlock // The memory blocks MemoryBlocks []Block // A and dict list of Passwords Passwords PassStruct }
func NewTerminal ¶
func NewTerminal(settings TerminalSettings) Terminal
type TerminalSettings ¶
type TerminalSettings struct { // The number of lines to generate PER COLUMN Lines int // The number of columns to generate Columns int // The number of passwords to generate Passwords int // Padding from the left edge GeneralPaddingX int // The padding between Y0 and the Header HeaderPaddingTopY int // The padding between the enter password line, and the blocks HeaderPaddingBottomY int // The width of Memory Lines MemoryWidth int // The padding between Columns MemoryPaddingX int // The width of Address lines AddressWidth int // The padding between Address lines AddressPaddingX int // Total Attempts TotalAttempts int }
Settings for the terminal window
func DefaultSettings ¶
func DefaultSettings() TerminalSettings
type TerminalStyle ¶
type TerminalStyle struct { Default tcell.Style Highlight tcell.Style LowDefault tcell.Style LowHighlight tcell.Style }
Click to show internal directories.
Click to hide internal directories.