grid

package
v0.0.0-...-973409f Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllOrientations

func AllOrientations(grid [][]rune) [][][]rune

AllOrientations all possible orientations of [][]rune grid

func BordersEqual

func BordersEqual(b1 []rune, b2 []rune) bool

BordersEqual tests []rune equality

func Equal

func Equal(g1 [][]rune, g2 [][]rune) bool

Equal checks if two [][]rune grids are equal

func Flip

func Flip(grid [][]rune) (flipped [][]rune)

Flip flips (mirrors) [][]rune grid

func GetCol

func GetCol(grid [][]rune, n int) []rune

GetCol returns n'th column of [][]rune

func GetRow

func GetRow(grid [][]rune, n int) []rune

GetRow returns n'th row of [][]rune

func ParseGrid

func ParseGrid(input string) (grid [][]rune)

ParseGrid parses string into [][]rune grid

func Print

func Print(grid [][]rune)

Print prints [][]rune to stdout

func RemoveBorders

func RemoveBorders(grid [][]rune) [][]rune

RemoveBorders removes borders

func Rotate

func Rotate(grid [][]rune) [][]rune

Rotate rotates [][]rune clockwise

func Sprint

func Sprint(grid [][]rune) (out string)

Sprint prints [][]rune to string

Types

This section is empty.

Jump to

Keyboard shortcuts

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