aocutils

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Readfile

func Readfile(path string) []string

func Timer

func Timer[T interface{}, R interface{}](name string, f func(T) R, arg T) R

Types

type GIF added in v1.1.0

type GIF struct {
	Images     []*image.Paletted
	Filename   string
	Frameskip  int
	Framecount int
}

func CreateGIF added in v1.0.7

func CreateGIF(filename string, frameskip int) GIF

func (*GIF) AddFrame added in v1.1.0

func (g *GIF) AddFrame(image Image)

func (*GIF) WriteGIFToFile added in v1.1.0

func (g *GIF) WriteGIFToFile()

type Grid added in v1.1.0

type Grid struct {
	Data map[Key]int
	Rows int
	Cols int
}

func CreateGrid added in v1.1.0

func CreateGrid(lines []string) Grid

func (*Grid) GetData added in v1.1.0

func (grid *Grid) GetData() map[Key]int

func (*Grid) GetNumCols added in v1.1.0

func (grid *Grid) GetNumCols() int

func (*Grid) GetNumRows added in v1.1.0

func (grid *Grid) GetNumRows() int

func (*Grid) GetValue added in v1.1.0

func (grid *Grid) GetValue(row int, col int) (int, bool)

func (*Grid) SetValue added in v1.1.0

func (grid *Grid) SetValue(row int, col int, value int)

type Image added in v1.0.8

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

func CreateImage added in v1.1.0

func CreateImage(rows int, cols int, zoom int, filename string) Image

func (*Image) Clone added in v1.0.9

func (img *Image) Clone() Image

func (*Image) GetRawImage added in v1.0.9

func (img *Image) GetRawImage() *image.Paletted

func (*Image) SetZoomedPixel added in v1.0.8

func (img *Image) SetZoomedPixel(i int, j int, value int)

func (*Image) UsePaletteBlues added in v1.0.9

func (img *Image) UsePaletteBlues()

func (*Image) UsePaletteGreens added in v1.0.9

func (img *Image) UsePaletteGreens()

func (*Image) UsePaletteReds added in v1.0.8

func (img *Image) UsePaletteReds()

func (*Image) UsePaletteWideReds added in v1.1.0

func (img *Image) UsePaletteWideReds()

func (*Image) WritePNGToFile added in v1.0.9

func (img *Image) WritePNGToFile()

type Key added in v1.1.0

type Key struct {
	Row int
	Col int
}

type Stack added in v1.0.6

type Stack[T any] []T

func (*Stack[T]) IsEmpty added in v1.0.6

func (s *Stack[T]) IsEmpty() bool

func (*Stack[T]) Peek added in v1.0.6

func (s *Stack[T]) Peek() (T, bool)

func (*Stack[T]) Pop added in v1.0.6

func (s *Stack[T]) Pop() (T, bool)

func (*Stack[T]) Push added in v1.0.6

func (s *Stack[T]) Push(value T)

Jump to

Keyboard shortcuts

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