Versions in this module Expand all Collapse all v2 v2.1.1 Nov 17, 2021 Changes in this version + var ErrorInvalidMaxSize = errors.New("error: invalid max stack size") + var ErrorInvalidStackIndex = errors.New("error: invalid stack index") + var ErrorMissingEndLoop = errors.New("error: missing end loop") + var ErrorMissingStartLoop = errors.New("error: missing start loop") + var ErrorNoSpaceString = errors.New("error: not enough space in to stack to push the string") + func LoadConfigs(path string) error v2.0.1 Nov 7, 2021 Changes in this version + var ErrorCloseFile = errors.New("error: unable to close the file") + var ErrorDecodeImage = errors.New("error: unable to decode specified image") + var ErrorFileAlreadyOpen = errors.New("error: trying to open multiple files") + var ErrorFileExtension = errors.New("error: target image must be .png") + var ErrorFullStack = errors.New("error: trying to push in a full stack") + var ErrorInputScanning = errors.New("error: problems reading input") + var ErrorInvalidHex = errors.New("error: invalid hex format") + var ErrorInvalidString = errors.New("error: invalid string into the stack") + var ErrorLoadConfig = errors.New("error: unable to load config file") + var ErrorOpenFile = errors.New("error: unable to open specified file") + var ErrorOpenImage = errors.New("error: unable to open specified image") + var ErrorOutOfBounds = errors.New("error: out of bounds") + var ErrorPop = errors.New("error: trying to pop an empty stack") + var ErrorRandomGenerator = errors.New("error: trying to generate a random number with n <= 0") + var ErrorReadFile = errors.New("error: error on reading opened file") + var ErrorWriteFile = errors.New("error: error on writing on opened file") + var OPERATIONS = map[string]*Pixel + func Btoi(b bool) int + func Itob(i int) bool + type Interpreter struct + func NewInterpreter(debug bool, configs string, maxSize int, instructionSize int) *Interpreter + func (i *Interpreter) LoadImage(path string) error + func (i *Interpreter) Run() + func (i *Interpreter) Step() (bool, string) + type Pixel struct + B uint8 + G uint8 + R uint8 + func (p *Pixel) Equals(other Pixel) bool + func (p *Pixel) String() string + type Stack struct + func NewStack(maxSize int) *Stack + func (stack *Stack) Clear() + func (stack *Stack) Cycle() + func (stack *Stack) GetItemAt(i int) int + func (stack *Stack) IsEmpty() bool + func (stack *Stack) Output() + func (stack *Stack) Peek() int + func (stack *Stack) Pop() (int, error) + func (stack *Stack) Push(val int) error + func (stack *Stack) RCycle() + func (stack *Stack) Reverse() + func (stack *Stack) Size() int Other modules containing this package github.com/Vinetwigs/vilmos