mountain

package
v0.0.0-...-0b2e390 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MountChar = "█"
	SnowChar  = "❄"
	MaxHeight = 30 // real maxHeight == maxHeight + 1
	MaxWidth  = 99 // real maxWidth == maxWidth + 1
)

Variables

This section is empty.

Functions

func FormatArr

func FormatArr(arr []int) string

returns an array with [x, y, z] format, not [x y z]

func GetMountain

func GetMountain() ([]int, int64)

Returns an int slice that represents the topographical map of a randomly generated mountain range.

func GetMountainS

func GetMountainS(seed int64) ([]int, int64)

Returns an int slice that represents the topographical map of a randomly generated mountain range with a given seed.

func GetMountainSWH

func GetMountainSWH(seed int64, width, height int) ([]int, int64)

Returns an int array that represents the topographical map of a randomly generated mountain range with a fixed width, max height, and given seed

func GetMountainSnowString

func GetMountainSnowString(mountain, snow []int) string

returns a nicely formatted string representation of a mountain range with snow on it

func GetMountainString

func GetMountainString(mountain []int) string

returns a nicely formatted string representation of a mountain range

func GetMountainW

func GetMountainW(width int) ([]int, int64)

Returns an int array that represents the topographical map of a randomly generated mountain range with a given width

Types

This section is empty.

Jump to

Keyboard shortcuts

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