grid

package
v0.0.0-...-26478da Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DIR_UP    = "up"
	DIR_DOWN  = "down"
	DIR_LEFT  = "left"
	DIR_RIGHT = "right"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Grid

type Grid [][]int

func NewGrid

func NewGrid(rows int) *Grid

func (*Grid) GetColumnsCount

func (g *Grid) GetColumnsCount() int

func (*Grid) GetRowsCount

func (g *Grid) GetRowsCount() int

func (*Grid) GetTotalCount

func (g *Grid) GetTotalCount() int

func (*Grid) GetTreeHeight

func (g *Grid) GetTreeHeight(row, col int) int

func (*Grid) GetTreeScenicScore

func (g *Grid) GetTreeScenicScore(row, col int) int

func (*Grid) IsAboveOtherTrees

func (g *Grid) IsAboveOtherTrees(opts *SearchOptions) bool

func (*Grid) IsOutOfBounds

func (g *Grid) IsOutOfBounds(row, col int) bool

func (*Grid) IsTreeVisible

func (g *Grid) IsTreeVisible(row, col int) bool

func (*Grid) SetTreesHeightAtRow

func (g *Grid) SetTreesHeightAtRow(rowNum int, input string)

func (*Grid) UpdateScenicScore

func (g *Grid) UpdateScenicScore(opts *UpdateScenicOptions) int

type SearchOptions

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

type UpdateScenicOptions

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

Jump to

Keyboard shortcuts

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