worldgen

package
v0.0.0-...-edab1cf Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Empty uint8 = 0
	Bloc  uint8 = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Coordinate

type Coordinate struct {
	X uint64
	Y uint64
}

type World

type World struct {
	Xsize  uint64    `json:"xsize"`
	Ysize  uint64    `json:"ysize"`
	Ground [][]uint8 `json:"ground"`
}

func Init

func Init(xsize uint64, ysize uint64, p float64) World

Init the World

func Loadjson

func Loadjson(pathFile string) World

func (World) GetBox

func (w World) GetBox(x uint64, y uint64) uint8

Get element in box

func (World) Show

func (w World) Show()

Show the World

Jump to

Keyboard shortcuts

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